home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / GXPrinting.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  179.7 KB  |  4,227 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        GXPrinting.h
  3.  
  4.      Contains:    This file contains all printing APIs except for driver/extension specific ones.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1994-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __GXPRINTING__
  18. #define __GXPRINTING__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __COLLECTIONS__
  25.     #include <Collections.h>
  26. #endif
  27.  
  28. #ifndef __DIALOGS__
  29.     #include <Dialogs.h>
  30. #endif
  31.  
  32. #ifndef __MACERRORS__
  33.     #include <MacErrors.h>
  34. #endif
  35.  
  36. #ifndef __FILES__
  37.     #include <Files.h>
  38. #endif
  39.  
  40. #ifndef __GXFONTS__
  41.     #include <GXFonts.h>
  42. #endif
  43.  
  44. #ifndef __GXMATH__
  45.     #include <GXMath.h>
  46. #endif
  47.  
  48. #ifndef __GXTYPES__
  49.     #include <GXTypes.h>
  50. #endif
  51.  
  52. #ifndef __LISTS__
  53.     #include <Lists.h>
  54. #endif
  55.  
  56. #ifndef __MENUS__
  57.     #include <Menus.h>
  58. #endif
  59.  
  60. #ifndef __GXMESSAGES__
  61.     #include <GXMessages.h>
  62. #endif
  63.  
  64. #ifndef __PRINTING__
  65.     #include <Printing.h>
  66. #endif
  67.  
  68. #ifndef __QUICKDRAW__
  69.     #include <Quickdraw.h>
  70. #endif
  71.  
  72.  
  73.  
  74.  
  75. #if PRAGMA_ONCE
  76. #pragma once
  77. #endif
  78.  
  79. #ifdef __cplusplus
  80. extern "C" {
  81. #endif
  82.  
  83. #if PRAGMA_IMPORT
  84. #pragma import on
  85. #endif
  86.  
  87. #if PRAGMA_STRUCT_ALIGN
  88.     #pragma options align=mac68k
  89. #elif PRAGMA_STRUCT_PACKPUSH
  90.     #pragma pack(push, 2)
  91. #elif PRAGMA_STRUCT_PACK
  92.     #pragma pack(2)
  93. #endif
  94.  
  95. /********************************************************************
  96.                     Start of old "GXPrintingManager.h/a/p" interface file.
  97.             *********************************************************************/
  98. /* ------------------------------------------------------------------------------
  99.  
  100.                             Printing Manager API Contants and Types
  101.  
  102. -------------------------------------------------------------------------------- */
  103.  
  104. typedef unsigned long                     gxOwnerSignature;
  105. #if OLDROUTINENAMES
  106. typedef unsigned long                     Signature;
  107. #endif  /* OLDROUTINENAMES */
  108.  
  109. /*
  110.  
  111.     ABSTRACT DATA TYPES
  112.  
  113. */
  114. /*
  115.    typedef struct gxPrivatePrinterRecord *gxPrinter;
  116.    typedef struct gxPrivateJobRecord *gxJob;
  117.    typedef struct gxPrivateFormatRecord *gxFormat;
  118.    typedef struct gxPrivatePaperTypeRecord *gxPaperType;
  119.    typedef struct gxPrivatePrintFileRecord *gxPrintFile;
  120. */
  121.  
  122. typedef struct OpaquegxPrinter*         gxPrinter;
  123. typedef struct OpaquegxJob*             gxJob;
  124. typedef struct OpaquegxFormat*             gxFormat;
  125. typedef struct OpaquegxPaperType*         gxPaperType;
  126. typedef struct OpaquegxPrintFile*         gxPrintFile;
  127. /* Possible values for LoopStatus */
  128. typedef Boolean                         gxLoopStatus;
  129. enum {
  130.     gxStopLooping                = false,
  131.     gxKeepLooping                = true
  132. };
  133.  
  134. typedef CALLBACK_API( gxLoopStatus , GXViewDeviceProcPtr )(gxViewDevice aViewDevice, void *refCon);
  135. typedef STACK_UPP_TYPE(GXViewDeviceProcPtr)                     GXViewDeviceUPP;
  136. #if OPAQUE_UPP_TYPES
  137.     EXTERN_API(GXViewDeviceUPP)
  138.     NewGXViewDeviceUPP               (GXViewDeviceProcPtr        userRoutine);
  139.  
  140.     EXTERN_API(void)
  141.     DisposeGXViewDeviceUPP           (GXViewDeviceUPP            userUPP);
  142.  
  143.     EXTERN_API(gxLoopStatus)
  144.     InvokeGXViewDeviceUPP           (gxViewDevice            aViewDevice,
  145.                                     void *                    refCon,
  146.                                     GXViewDeviceUPP            userUPP);
  147.  
  148. #else
  149.     enum { uppGXViewDeviceProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  150.     #define NewGXViewDeviceUPP(userRoutine)                         (GXViewDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXViewDeviceProcInfo, GetCurrentArchitecture())
  151.     #define DisposeGXViewDeviceUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  152.     #define InvokeGXViewDeviceUPP(aViewDevice, refCon, userUPP)     (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXViewDeviceProcInfo, (aViewDevice), (refCon))
  153. #endif
  154. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  155. #define NewGXViewDeviceProc(userRoutine)                         NewGXViewDeviceUPP(userRoutine)
  156. #define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon)    InvokeGXViewDeviceUPP(aViewDevice, refCon, userRoutine)
  157. typedef CALLBACK_API( gxLoopStatus , GXFormatProcPtr )(gxFormat aFormat, void *refCon);
  158. typedef STACK_UPP_TYPE(GXFormatProcPtr)                         GXFormatUPP;
  159. #if OPAQUE_UPP_TYPES
  160.     EXTERN_API(GXFormatUPP)
  161.     NewGXFormatUPP                   (GXFormatProcPtr            userRoutine);
  162.  
  163.     EXTERN_API(void)
  164.     DisposeGXFormatUPP               (GXFormatUPP                userUPP);
  165.  
  166.     EXTERN_API(gxLoopStatus)
  167.     InvokeGXFormatUPP               (gxFormat                aFormat,
  168.                                     void *                    refCon,
  169.                                     GXFormatUPP                userUPP);
  170.  
  171. #else
  172.     enum { uppGXFormatProcInfo = 0x000003D0 };                         /* pascal 1_byte Func(4_bytes, 4_bytes) */
  173.     #define NewGXFormatUPP(userRoutine)                             (GXFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatProcInfo, GetCurrentArchitecture())
  174.     #define DisposeGXFormatUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  175.     #define InvokeGXFormatUPP(aFormat, refCon, userUPP)             (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXFormatProcInfo, (aFormat), (refCon))
  176. #endif
  177. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  178. #define NewGXFormatProc(userRoutine)                             NewGXFormatUPP(userRoutine)
  179. #define CallGXFormatProc(userRoutine, aFormat, refCon)            InvokeGXFormatUPP(aFormat, refCon, userRoutine)
  180. typedef CALLBACK_API( gxLoopStatus , GXPaperTypeProcPtr )(gxPaperType aPapertype, void *refCon);
  181. typedef STACK_UPP_TYPE(GXPaperTypeProcPtr)                         GXPaperTypeUPP;
  182. #if OPAQUE_UPP_TYPES
  183.     EXTERN_API(GXPaperTypeUPP)
  184.     NewGXPaperTypeUPP               (GXPaperTypeProcPtr        userRoutine);
  185.  
  186.     EXTERN_API(void)
  187.     DisposeGXPaperTypeUPP           (GXPaperTypeUPP            userUPP);
  188.  
  189.     EXTERN_API(gxLoopStatus)
  190.     InvokeGXPaperTypeUPP           (gxPaperType                aPapertype,
  191.                                     void *                    refCon,
  192.                                     GXPaperTypeUPP            userUPP);
  193.  
  194. #else
  195.     enum { uppGXPaperTypeProcInfo = 0x000003D0 };                     /* pascal 1_byte Func(4_bytes, 4_bytes) */
  196.     #define NewGXPaperTypeUPP(userRoutine)                             (GXPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPaperTypeProcInfo, GetCurrentArchitecture())
  197.     #define DisposeGXPaperTypeUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  198.     #define InvokeGXPaperTypeUPP(aPapertype, refCon, userUPP)         (gxLoopStatus)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPaperTypeProcInfo, (aPapertype), (refCon))
  199. #endif
  200. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  201. #define NewGXPaperTypeProc(userRoutine)                         NewGXPaperTypeUPP(userRoutine)
  202. #define CallGXPaperTypeProc(userRoutine, aPapertype, refCon)    InvokeGXPaperTypeUPP(aPapertype, refCon, userRoutine)
  203. typedef CALLBACK_API( OSErr , GXPrintingFlattenProcPtr )(long size, void *data, void *refCon);
  204. typedef STACK_UPP_TYPE(GXPrintingFlattenProcPtr)                 GXPrintingFlattenUPP;
  205. #if OPAQUE_UPP_TYPES
  206.     EXTERN_API(GXPrintingFlattenUPP)
  207.     NewGXPrintingFlattenUPP           (GXPrintingFlattenProcPtr userRoutine);
  208.  
  209.     EXTERN_API(void)
  210.     DisposeGXPrintingFlattenUPP       (GXPrintingFlattenUPP    userUPP);
  211.  
  212.     EXTERN_API(OSErr)
  213.     InvokeGXPrintingFlattenUPP       (long                    size,
  214.                                     void *                    data,
  215.                                     void *                    refCon,
  216.                                     GXPrintingFlattenUPP    userUPP);
  217.  
  218. #else
  219.     enum { uppGXPrintingFlattenProcInfo = 0x00000FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  220.     #define NewGXPrintingFlattenUPP(userRoutine)                     (GXPrintingFlattenUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, GetCurrentArchitecture())
  221.     #define DisposeGXPrintingFlattenUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  222.     #define InvokeGXPrintingFlattenUPP(size, data, refCon, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXPrintingFlattenProcInfo, (size), (data), (refCon))
  223. #endif
  224. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  225. #define NewGXPrintingFlattenProc(userRoutine)                     NewGXPrintingFlattenUPP(userRoutine)
  226. #define CallGXPrintingFlattenProc(userRoutine, size, data, refCon) InvokeGXPrintingFlattenUPP(size, data, refCon, userRoutine)
  227. #if OLDROUTINENAMES
  228. typedef GXViewDeviceProcPtr             gxViewDeviceProc;
  229. typedef GXFormatProcPtr                 gxFormatProc;
  230. typedef GXPaperTypeProcPtr                 gxPaperTypeProc;
  231. typedef GXPrintingFlattenProcPtr         gxPrintingFlattenProc;
  232. #endif  /* OLDROUTINENAMES */
  233.  
  234. /*
  235.     The following constants are used to set collection item flags in printing
  236.     collections. The Printing Manager purges certain items whenever a driver
  237.     switch occurs. If the formatting driver changes, all items marked as
  238.     gxVolatileFormattingDriverCategory will be purged.  If the output driver
  239.     changes, all items marked as gxVolatileOutputDriverCategory will be purged.
  240.     Note that to prevent items from being flattened when GXFlattenJob is called,
  241.     you should unset the collectionPersistenceBit (defined in Collections.h),
  242.     which is on by default.
  243. */
  244. /* Structure stored in collection items' user attribute bits */
  245. typedef short                             gxCollectionCategory;
  246. enum {
  247.     gxNoCollectionCategory        = 0x0000,
  248.     gxOutputDriverCategory        = 0x0001,
  249.     gxFormattingDriverCategory    = 0x0002,
  250.     gxDriverVolatileCategory    = 0x0004,
  251.     gxVolatileOutputDriverCategory = gxOutputDriverCategory + gxDriverVolatileCategory,
  252.     gxVolatileFormattingDriverCategory = gxFormattingDriverCategory + gxDriverVolatileCategory
  253. };
  254.  
  255.  
  256. /*
  257.  
  258.     >>>>>> JOB COLLECTION ITEMS <<<<<<
  259.  
  260. */
  261.  
  262. /* gxJobInfo COLLECTION ITEM */
  263. enum {
  264.     gxJobTag                    = FOUR_CHAR_CODE('job ')
  265. };
  266.  
  267.  
  268. struct gxJobInfo {
  269.     long                             numPages;                    /* Number of pages in the document */
  270.     long                             priority;                    /* Priority of this job plus "is it on hold?" */
  271.     unsigned long                     timeToPrint;                /* When to print job, if scheduled */
  272.     long                             jobTimeout;                    /* Timeout value, in ticks */
  273.     long                             firstPageToPrint;            /* Start printing from this page */
  274.     short                             jobAlert;                    /* How to alert user when printing */
  275.     Str31                             appName;                    /* Which application printed the document */
  276.     Str31                             documentName;                /* The name of the document being printed */
  277.     Str31                             userName;                    /* The owner name of the machine that printed the document */
  278. };
  279. typedef struct gxJobInfo                gxJobInfo;
  280. /* gxPDDDefaultSettingTag COLLECTION ITEM */
  281. enum {
  282.     gxPDDDefaultSettingTag        = FOUR_CHAR_CODE('pdds')
  283. };
  284.  
  285.  
  286. struct gxPDDDefaultSettingInfo {
  287.     Boolean                         useDefaultSetting;            /* true if PDD default setting should be used */
  288.     SInt8                             pad;
  289. };
  290. typedef struct gxPDDDefaultSettingInfo    gxPDDDefaultSettingInfo;
  291. /* priority field constants */
  292. enum {
  293.     gxPrintJobHoldingBit        = 0x00001000                    /* This bit is set if the job is on hold. */
  294. };
  295.  
  296. enum {
  297.     gxPrintJobUrgent            = 0x00000001,
  298.     gxPrintJobAtTime            = 0x00000002,
  299.     gxPrintJobASAP                = 0x00000003,
  300.     gxPrintJobHolding            = (gxPrintJobHoldingBit + gxPrintJobASAP),
  301.     gxPrintJobHoldingAtTime        = (gxPrintJobHoldingBit + gxPrintJobAtTime),
  302.     gxPrintJobHoldingUrgent        = (gxPrintJobHoldingBit + gxPrintJobUrgent)
  303. };
  304.  
  305. /* jobAlert field constants */
  306. enum {
  307.     gxNoPrintTimeAlert            = 0,                            /* Don't alert user when we print */
  308.     gxAlertBefore                = 1,                            /* Alert user before we print */
  309.     gxAlertAfter                = 2,                            /* Alert user after we print */
  310.     gxAlertBothTimes            = 3                                /* Alert before and after we print */
  311. };
  312.  
  313. /* jobTimeout field constants */
  314. enum {
  315.     gxThirtySeconds                = 1800,                            /* 30 seconds in ticks */
  316.     gxTwoMinutes                = 7200                            /* 2 minutes in ticks */
  317. };
  318.  
  319.  
  320. /* gxCollationTag COLLECTION ITEM */
  321. enum {
  322.     gxCollationTag                = FOUR_CHAR_CODE('sort')
  323. };
  324.  
  325.  
  326. struct gxCollationInfo {
  327.     Boolean                         collation;                    /* True if copies are to be collated */
  328.     char                             padByte;
  329. };
  330. typedef struct gxCollationInfo            gxCollationInfo;
  331.  
  332. /* gxCopiesTag COLLECTION ITEM */
  333. enum {
  334.     gxCopiesTag                    = FOUR_CHAR_CODE('copy')
  335. };
  336.  
  337.  
  338. struct gxCopiesInfo {
  339.     long                             copies;                        /* Number of copies of the document to print */
  340. };
  341. typedef struct gxCopiesInfo                gxCopiesInfo;
  342.  
  343. /* gxPageRangeTag COLLECTION ITEM */
  344. enum {
  345.     gxPageRangeTag                = FOUR_CHAR_CODE('rang')
  346. };
  347.  
  348.  
  349. struct gxSimplePageRangeInfo {
  350.     char                             optionChosen;                /* From options listed below */
  351.     Boolean                         printAll;                    /* True if user wants to print all pages */
  352.     long                             fromPage;                    /* For gxDefaultPageRange, current value */
  353.     long                             toPage;                        /* For gxDefaultPageRange, current value */
  354. };
  355. typedef struct gxSimplePageRangeInfo    gxSimplePageRangeInfo;
  356.  
  357. struct gxPageRangeInfo {
  358.     gxSimplePageRangeInfo             simpleRange;                /* Info which will be returned for GetJobPageRange */
  359.     Str31                             fromString;                    /* For gxCustomizePageRange, current value */
  360.     Str31                             toString;                    /* For gxCustomizePageRange, current value */
  361.     long                             minFromPage;                /* For gxDefaultPageRange, we parse with this, ignored if nil */
  362.     long                             maxToPage;                    /* For gxDefaultPageRange, we parse with this, ignored if nil */
  363.     char                             replaceString[1];            /* For gxReplacePageRange, string to display */
  364. };
  365. typedef struct gxPageRangeInfo            gxPageRangeInfo;
  366.  
  367. /* optionChosen field constants for SimplePageRangeInfo */
  368. enum {
  369.     gxDefaultPageRange            = 0,
  370.     gxReplacePageRange            = 1,
  371.     gxCustomizePageRange        = 2
  372. };
  373.  
  374.  
  375. /* gxQualityTag COLLECTION ITEM */
  376. enum {
  377.     gxQualityTag                = FOUR_CHAR_CODE('qual')
  378. };
  379.  
  380.  
  381. struct gxQualityInfo {
  382.     Boolean                         disableQuality;                /* True to disable standard quality controls */
  383.     char                             padByte;
  384.     short                             defaultQuality;                /* The default quality value */
  385.     short                             currentQuality;                /* The current quality value */
  386.     short                             qualityCount;                /* The number of quality menu items in popup menu */
  387.     char                             qualityNames[1];            /* An array of packed pascal strings for popup menu titles */
  388. };
  389. typedef struct gxQualityInfo            gxQualityInfo;
  390.  
  391. /* gxFileDestinationTag COLLECTION ITEM */
  392. enum {
  393.     gxFileDestinationTag        = FOUR_CHAR_CODE('dest')
  394. };
  395.  
  396.  
  397. struct gxFileDestinationInfo {
  398.     Boolean                         toFile;                        /* True if destination is a file */
  399.     char                             padByte;
  400. };
  401. typedef struct gxFileDestinationInfo    gxFileDestinationInfo;
  402.  
  403. /* gxFileLocationTag COLLECTION ITEM */
  404. enum {
  405.     gxFileLocationTag            = FOUR_CHAR_CODE('floc')
  406. };
  407.  
  408.  
  409. struct gxFileLocationInfo {
  410.     FSSpec                             fileSpec;                    /* Location to put file, if destination is file */
  411. };
  412. typedef struct gxFileLocationInfo        gxFileLocationInfo;
  413.  
  414. /* gxFileFormatTag COLLECTION ITEM */
  415. enum {
  416.     gxFileFormatTag                = FOUR_CHAR_CODE('ffmt')
  417. };
  418.  
  419.  
  420. struct gxFileFormatInfo {
  421.     Str31                             fileFormatName;                /* Name of file format (e.g. "PostScript") if destination is file */
  422. };
  423. typedef struct gxFileFormatInfo            gxFileFormatInfo;
  424.  
  425. /* gxFileFontsTag COLLECTION ITEM */
  426. enum {
  427.     gxFileFontsTag                = FOUR_CHAR_CODE('incf')
  428. };
  429.  
  430.  
  431. struct gxFileFontsInfo {
  432.     char                             includeFonts;                /* Which fonts to include, if destination is file */
  433.     char                             padByte;
  434. };
  435. typedef struct gxFileFontsInfo            gxFileFontsInfo;
  436. /* includeFonts field constants */
  437. enum {
  438.     gxIncludeNoFonts            = 1,                            /* Include no fonts */
  439.     gxIncludeAllFonts            = 2,                            /* Include all fonts */
  440.     gxIncludeNonStandardFonts    = 3                                /* Include only fonts that aren't in the standard LW set */
  441. };
  442.  
  443.  
  444. /* gxPaperFeedTag COLLECTION ITEM */
  445. enum {
  446.     gxPaperFeedTag                = FOUR_CHAR_CODE('feed')
  447. };
  448.  
  449.  
  450. struct gxPaperFeedInfo {
  451.     Boolean                         autoFeed;                    /* True if automatic feed, false if manual */
  452.     char                             padByte;
  453. };
  454. typedef struct gxPaperFeedInfo            gxPaperFeedInfo;
  455.  
  456. /* gxTrayFeedTag COLLECTION ITEM */
  457. enum {
  458.     gxTrayFeedTag                = FOUR_CHAR_CODE('tray')
  459. };
  460.  
  461.  
  462. typedef long                             gxTrayIndex;
  463.  
  464. struct gxTrayFeedInfo {
  465.     gxTrayIndex                     feedTrayIndex;                /* Tray to feed paper from */
  466.     Boolean                         manualFeedThisPage;            /* Signals manual feeding for the page */
  467.     char                             padByte;
  468. };
  469. typedef struct gxTrayFeedInfo            gxTrayFeedInfo;
  470.  
  471. /* gxManualFeedTag COLLECTION ITEM */
  472. enum {
  473.     gxManualFeedTag                = FOUR_CHAR_CODE('manf')
  474. };
  475.  
  476.  
  477. struct gxManualFeedInfo {
  478.     long                             numPaperTypeNames;            /* Number of paperTypes to manually feed */
  479.     Str31                             paperTypeNames[1];            /* Array of names of paperTypes to manually feed */
  480. };
  481. typedef struct gxManualFeedInfo            gxManualFeedInfo;
  482.  
  483. /* gxNormalMappingTag COLLECTION ITEM */
  484. enum {
  485.     gxNormalMappingTag            = FOUR_CHAR_CODE('nmap')
  486. };
  487.  
  488.  
  489. struct gxNormalMappingInfo {
  490.     Boolean                         normalPaperMapping;            /* True if not overriding normal paper mapping */
  491.     char                             padByte;
  492. };
  493. typedef struct gxNormalMappingInfo        gxNormalMappingInfo;
  494.  
  495. /* gxSpecialMappingTag COLLECTION ITEM */
  496. enum {
  497.     gxSpecialMappingTag            = FOUR_CHAR_CODE('smap')
  498. };
  499.  
  500.  
  501. struct gxSpecialMappingInfo {
  502.     char                             specialMapping;                /* Enumerated redirect, scale or tile setting */
  503.     char                             padByte;
  504. };
  505. typedef struct gxSpecialMappingInfo        gxSpecialMappingInfo;
  506. /* specialMapping field constants */
  507. enum {
  508.     gxRedirectPages                = 1,                            /* Redirect pages to a papertype and clip if necessary */
  509.     gxScalePages                = 2,                            /* Scale pages if necessary */
  510.     gxTilePages                    = 3                                /* Tile pages if necessary */
  511. };
  512.  
  513.  
  514. /* gxTrayMappingTag COLLECTION ITEM */
  515. enum {
  516.     gxTrayMappingTag            = FOUR_CHAR_CODE('tmap')
  517. };
  518.  
  519.  
  520. struct gxTrayMappingInfo {
  521.     gxTrayIndex                     mapPaperToTray;                /* Tray to map all paper to */
  522. };
  523. typedef struct gxTrayMappingInfo        gxTrayMappingInfo;
  524.  
  525. /* gxPaperMappingTag COLLECTION ITEM */
  526. /* This collection item contains a flattened paper type resource */
  527. enum {
  528.     gxPaperMappingTag            = FOUR_CHAR_CODE('pmap')
  529. };
  530.  
  531.  
  532. /* gxPrintPanelTag COLLECTION ITEM */
  533. enum {
  534.     gxPrintPanelTag                = FOUR_CHAR_CODE('ppan')
  535. };
  536.  
  537.  
  538. struct gxPrintPanelInfo {
  539.     Str31                             startPanelName;                /* Name of starting panel in Print dialog */
  540. };
  541. typedef struct gxPrintPanelInfo            gxPrintPanelInfo;
  542.  
  543. /* gxFormatPanelTag COLLECTION ITEM */
  544. enum {
  545.     gxFormatPanelTag            = FOUR_CHAR_CODE('fpan')
  546. };
  547.  
  548.  
  549. struct gxFormatPanelInfo {
  550.     Str31                             startPanelName;                /* Name of starting panel in Format dialog */
  551. };
  552. typedef struct gxFormatPanelInfo        gxFormatPanelInfo;
  553.  
  554. /* gxTranslatedDocumentTag COLLECTION ITEM */
  555. enum {
  556.     gxTranslatedDocumentTag        = FOUR_CHAR_CODE('trns')
  557. };
  558.  
  559.  
  560. struct gxTranslatedDocumentInfo {
  561.     long                             translatorInfo;                /* Information from the translation process */
  562. };
  563. typedef struct gxTranslatedDocumentInfo    gxTranslatedDocumentInfo;
  564.  
  565. /* gxCoverPageTag COLLECTION ITEM */
  566. enum {
  567.     gxCoverPageTag                = FOUR_CHAR_CODE('cvpg')
  568. };
  569.  
  570.  
  571.  
  572. struct gxCoverPageInfo {
  573.     long                             coverPage;                    /* Use same enum values as for PrintRecord field in GXPrinterDrivers.h */
  574. };
  575. typedef struct gxCoverPageInfo            gxCoverPageInfo;
  576. /*
  577.  
  578.     >>>>>> FORMAT COLLECTION ITEMS <<<<<<
  579.  
  580. */
  581. /* gxPaperTypeLockTag COLLECTION ITEM */
  582. enum {
  583.     gxPaperTypeLockTag            = FOUR_CHAR_CODE('ptlk')
  584. };
  585.  
  586.  
  587. struct gxPaperTypeLockInfo {
  588.     Boolean                         paperTypeLocked;            /* True if format's paperType is locked */
  589.     char                             padByte;
  590. };
  591. typedef struct gxPaperTypeLockInfo        gxPaperTypeLockInfo;
  592.  
  593. /* gxOrientationTag COLLECTION ITEM */
  594. enum {
  595.     gxOrientationTag            = FOUR_CHAR_CODE('layo')
  596. };
  597.  
  598.  
  599. struct gxOrientationInfo {
  600.     char                             orientation;                /* An enumerated orientation value */
  601.     char                             padByte;
  602. };
  603. typedef struct gxOrientationInfo        gxOrientationInfo;
  604. /* orientation field constants */
  605. enum {
  606.     gxPortraitLayout            = 0,                            /* Portrait */
  607.     gxLandscapeLayout            = 1,                            /* Landscape */
  608.     gxRotatedPortraitLayout        = 2,                            /* Portrait, rotated 180. */
  609.     gxRotatedLandscapeLayout    = 3                                /* Landscape, rotated 180.  */
  610. };
  611.  
  612.  
  613. /* gxScalingTag COLLECTION ITEM */
  614. enum {
  615.     gxScalingTag                = FOUR_CHAR_CODE('scal')
  616. };
  617.  
  618.  
  619. struct gxScalingInfo {
  620.     Fixed                             horizontalScaleFactor;        /* Current horizontal scaling factor */
  621.     Fixed                             verticalScaleFactor;        /* Current vertical scaling factor */
  622.     short                             minScaling;                    /* Minimum scaling allowed */
  623.     short                             maxScaling;                    /* Maximum scaling allowed */
  624. };
  625. typedef struct gxScalingInfo            gxScalingInfo;
  626.  
  627. /* gxDirectModeTag COLLECTION ITEM */
  628. enum {
  629.     gxDirectModeTag                = FOUR_CHAR_CODE('dirm')
  630. };
  631.  
  632.  
  633. struct gxDirectModeInfo {
  634.     Boolean                         directModeOn;                /* True if a direct mode is enabled */
  635.     char                             padByte;
  636. };
  637. typedef struct gxDirectModeInfo            gxDirectModeInfo;
  638.  
  639. /* gxFormatHalftoneTag COLLECTION ITEM */
  640. enum {
  641.     gxFormatHalftoneTag            = FOUR_CHAR_CODE('half')
  642. };
  643.  
  644.  
  645. struct gxFormatHalftoneInfo {
  646.     long                             numHalftones;                /* Number of halftone records */
  647.     gxHalftone                         halftones[1];                /* The halftone records */
  648. };
  649. typedef struct gxFormatHalftoneInfo        gxFormatHalftoneInfo;
  650.  
  651. /* gxInvertPageTag COLLECTION ITEM */
  652. enum {
  653.     gxInvertPageTag                = FOUR_CHAR_CODE('invp')
  654. };
  655.  
  656.  
  657. struct gxInvertPageInfo {
  658.     char                             padByte;
  659.     Boolean                         invert;                        /* If true, invert page */
  660. };
  661. typedef struct gxInvertPageInfo            gxInvertPageInfo;
  662.  
  663. /* gxFlipPageHorizontalTag COLLECTION ITEM */
  664. enum {
  665.     gxFlipPageHorizontalTag        = FOUR_CHAR_CODE('flph')
  666. };
  667.  
  668.  
  669. struct gxFlipPageHorizontalInfo {
  670.     char                             padByte;
  671.     Boolean                         flipHorizontal;                /* If true, flip x coordinates on page */
  672. };
  673. typedef struct gxFlipPageHorizontalInfo    gxFlipPageHorizontalInfo;
  674.  
  675. /* gxFlipPageVerticalTag COLLECTION ITEM */
  676. enum {
  677.     gxFlipPageVerticalTag        = FOUR_CHAR_CODE('flpv')
  678. };
  679.  
  680.  
  681. struct gxFlipPageVerticalInfo {
  682.     char                             padByte;
  683.     Boolean                         flipVertical;                /* If true, flip y coordinates on page */
  684. };
  685. typedef struct gxFlipPageVerticalInfo    gxFlipPageVerticalInfo;
  686.  
  687. /* gxPreciseBitmapsTag COLLECTION ITEM */
  688. enum {
  689.     gxPreciseBitmapsTag            = FOUR_CHAR_CODE('pbmp')
  690. };
  691.  
  692.  
  693. struct gxPreciseBitmapInfo {
  694.     Boolean                         preciseBitmaps;                /* If true, scale page by 96% */
  695.     char                             padByte;
  696. };
  697. typedef struct gxPreciseBitmapInfo        gxPreciseBitmapInfo;
  698.  
  699. /*
  700.  
  701.     >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
  702.  
  703. */
  704. /* gxBaseTag COLLECTION ITEM */
  705. enum {
  706.     gxBaseTag                    = FOUR_CHAR_CODE('base')
  707. };
  708.  
  709.  
  710. struct gxBaseInfo {
  711.     long                             baseType;                    /* PaperType's base type */
  712. };
  713. typedef struct gxBaseInfo                gxBaseInfo;
  714. /* baseType field constants */
  715. enum {
  716.     gxUnknownBase                = 0,                            /* Base paper type from which this paper type is */
  717.     gxUSLetterBase                = 1,                            /* derived.  This is not a complete set. */
  718.     gxUSLegalBase                = 2,
  719.     gxA4LetterBase                = 3,
  720.     gxB5LetterBase                = 4,
  721.     gxTabloidBase                = 5
  722. };
  723.  
  724.  
  725. /* gxCreatorTag COLLECTION ITEM */
  726. enum {
  727.     gxCreatorTag                = FOUR_CHAR_CODE('crea')
  728. };
  729.  
  730.  
  731. struct gxCreatorInfo {
  732.     OSType                             creator;                    /* PaperType's creator */
  733. };
  734. typedef struct gxCreatorInfo            gxCreatorInfo;
  735. /* gxUnitsTag COLLECTION ITEM */
  736. enum {
  737.     gxUnitsTag                    = FOUR_CHAR_CODE('unit')
  738. };
  739.  
  740.  
  741. struct gxUnitsInfo {
  742.     char                             units;                        /* PaperType's units (used by PaperType Editor). */
  743.     char                             padByte;
  744. };
  745. typedef struct gxUnitsInfo                gxUnitsInfo;
  746. /* units field constants */
  747. enum {
  748.     gxPicas                        = 0,                            /* Pica measurement */
  749.     gxMMs                        = 1,                            /* Millimeter measurement */
  750.     gxInches                    = 2                                /* Inches measurement */
  751. };
  752.  
  753.  
  754. /* gxFlagsTag COLLECTION ITEM */
  755. enum {
  756.     gxFlagsTag                    = FOUR_CHAR_CODE('flag')
  757. };
  758.  
  759.  
  760. struct gxFlagsInfo {
  761.     long                             flags;                        /* PaperType's flags */
  762. };
  763. typedef struct gxFlagsInfo                gxFlagsInfo;
  764. /* flags field constants */
  765. enum {
  766.     gxOldPaperTypeFlag            = 0x00800000,                    /* Indicates a paper type for compatibility printing */
  767.     gxNewPaperTypeFlag            = 0x00400000,                    /* Indicates a paper type for QuickDraw GX-aware printing */
  768.     gxOldAndNewFlag                = 0x00C00000,                    /* Indicates a paper type that's both old and new */
  769.     gxDefaultPaperTypeFlag        = 0x00100000                    /* Indicates the default paper type in the group */
  770. };
  771.  
  772.  
  773. /* gxCommentTag COLLECTION ITEM */
  774. enum {
  775.     gxCommentTag                = FOUR_CHAR_CODE('cmnt')
  776. };
  777.  
  778.  
  779. struct gxCommentInfo {
  780.     Str255                             comment;                    /* PaperType's comment */
  781. };
  782. typedef struct gxCommentInfo            gxCommentInfo;
  783.  
  784. /*
  785.  
  786.     >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
  787.  
  788. */
  789. /* gxPenTableTag COLLECTION ITEM */
  790. enum {
  791.     gxPenTableTag                = FOUR_CHAR_CODE('pent')
  792. };
  793.  
  794.  
  795. struct gxPenTableEntry {
  796.     Str31                             penName;                    /* Name of the pen */
  797.     gxColor                         penColor;                    /* Color to use from the color set */
  798.     Fixed                             penThickness;                /* Size of the pen */
  799.     short                             penUnits;                    /* Specifies units in which pen thickness is defined */
  800.     short                             penPosition;                /* Pen position in the carousel, -1 (kPenNotLoaded) if not loaded */
  801. };
  802. typedef struct gxPenTableEntry            gxPenTableEntry;
  803.  
  804. struct gxPenTable {
  805.     long                             numPens;                    /* Number of pen entries in the following array */
  806.     gxPenTableEntry                 pens[1];                    /* Array of pen entries */
  807. };
  808. typedef struct gxPenTable                gxPenTable;
  809. typedef gxPenTable *                    gxPenTablePtr;
  810. typedef gxPenTablePtr *                    gxPenTableHdl;
  811. /* penUnits field constants */
  812. enum {
  813.     gxDeviceUnits                = 0,
  814.     gxMMUnits                    = 1,
  815.     gxInchesUnits                = 2
  816. };
  817.  
  818. /* penPosition field constants */
  819. enum {
  820.     gxPenNotLoaded                = -1
  821. };
  822.  
  823.  
  824. /*
  825.  
  826.     >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
  827.  
  828. */
  829.  
  830. typedef long                             gxDialogResult;
  831. enum {
  832.     gxCancelSelected            = 0L,
  833.     gxOKSelected                = 1L,
  834.     gxRevertSelected            = 2L
  835. };
  836.  
  837.  
  838.  
  839. struct gxEditMenuRecord {
  840.     short                             editMenuID;
  841.     short                             cutItem;
  842.     short                             copyItem;
  843.     short                             pasteItem;
  844.     short                             clearItem;
  845.     short                             undoItem;
  846. };
  847. typedef struct gxEditMenuRecord            gxEditMenuRecord;
  848.  
  849. /*
  850.  
  851.     >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
  852.  
  853. */
  854.  
  855. typedef OSType                             gxJobFormatMode;
  856.  
  857. struct gxJobFormatModeTable {
  858.     long                             numModes;                    /* Number of job format modes to choose from */
  859.     gxJobFormatMode                 modes[1];                    /* The job format modes */
  860. };
  861. typedef struct gxJobFormatModeTable        gxJobFormatModeTable;
  862. typedef gxJobFormatModeTable *            gxJobFormatModeTablePtr;
  863. typedef gxJobFormatModeTablePtr *        gxJobFormatModeTableHdl;
  864. enum {
  865.     gxGraphicsJobFormatMode        = FOUR_CHAR_CODE('grph'),
  866.     gxTextJobFormatMode            = FOUR_CHAR_CODE('text'),
  867.     gxPostScriptJobFormatMode    = FOUR_CHAR_CODE('post')
  868. };
  869.  
  870.  
  871. typedef long                             gxQueryType;
  872. enum {
  873.     gxGetJobFormatLineConstraintQuery = 0L,
  874.     gxGetJobFormatFontsQuery    = 1L,
  875.     gxGetJobFormatFontCommonStylesQuery = 2L,
  876.     gxGetJobFormatFontConstraintQuery = 3L,
  877.     gxSetStyleJobFormatCommonStyleQuery = 4L
  878. };
  879.  
  880.  
  881. /* Structures used for Text mode field constants */
  882.  
  883. struct gxPositionConstraintTable {
  884.     gxPoint                         phase;                        /* Position phase */
  885.     gxPoint                         offset;                        /* Position offset */
  886.     long                             numSizes;                    /* Number of available font sizes */
  887.     Fixed                             sizes[1];                    /* The available font sizes */
  888. };
  889. typedef struct gxPositionConstraintTable gxPositionConstraintTable;
  890. typedef gxPositionConstraintTable *        gxPositionConstraintTablePtr;
  891. typedef gxPositionConstraintTablePtr *    gxPositionConstraintTableHdl;
  892. /* numSizes field constants */
  893. enum {
  894.     gxConstraintRange            = -1
  895. };
  896.  
  897.  
  898. struct gxStyleNameTable {
  899.     long                             numStyleNames;                /* Number of style names */
  900.     Str255                             styleNames[1];                /* The style names */
  901. };
  902. typedef struct gxStyleNameTable            gxStyleNameTable;
  903. typedef gxStyleNameTable *                gxStyleNameTablePtr;
  904. typedef gxStyleNameTablePtr *            gxStyleNameTableHdl;
  905.  
  906. struct gxFontTable {
  907.     long                             numFonts;                    /* Number of font references */
  908.     gxFont                             fonts[1];                    /* The font references */
  909. };
  910. typedef struct gxFontTable                gxFontTable;
  911. typedef gxFontTable *                    gxFontTablePtr;
  912. typedef gxFontTablePtr *                gxFontTableHdl;
  913. /* ------------------------------------------------------------------------------
  914.  
  915.                                 Printing Manager API Functions
  916.  
  917. -------------------------------------------------------------------------------- */
  918. /*
  919.     Global Routines
  920. */
  921. EXTERN_API( OSErr )
  922. GXInitPrinting                    (void)                                                        FOURWORDINLINE(0x203C, 0x0000, 0x0000, 0xABFE);
  923.  
  924. EXTERN_API( OSErr )
  925. GXExitPrinting                    (void)                                                        FOURWORDINLINE(0x203C, 0x0000, 0x0001, 0xABFE);
  926.  
  927.  
  928. /*
  929.     Error-Handling Routines
  930. */
  931. EXTERN_API( OSErr )
  932. GXGetJobError                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x000E, 0xABFE);
  933.  
  934. EXTERN_API( void )
  935. GXSetJobError                    (gxJob                     aJob,
  936.                                  OSErr                     anErr)                                FOURWORDINLINE(0x203C, 0x0000, 0x000F, 0xABFE);
  937.  
  938.  
  939. /*
  940.     Job Routines
  941. */
  942. EXTERN_API( OSErr )
  943. GXNewJob                        (gxJob *                aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0002, 0xABFE);
  944.  
  945. EXTERN_API( OSErr )
  946. GXDisposeJob                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0003, 0xABFE);
  947.  
  948. EXTERN_API( void )
  949. GXFlattenJob                    (gxJob                     aJob,
  950.                                  GXPrintingFlattenUPP     flattenProc,
  951.                                  void *                    aVoid)                                FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xABFE);
  952.  
  953. EXTERN_API( gxJob )
  954. GXUnflattenJob                    (gxJob                     aJob,
  955.                                  GXPrintingFlattenUPP     flattenProc,
  956.                                  void *                    aVoid)                                FOURWORDINLINE(0x203C, 0x0000, 0x0005, 0xABFE);
  957.  
  958. EXTERN_API( Handle )
  959. GXFlattenJobToHdl                (gxJob                     aJob,
  960.                                  Handle                 aHdl)                                FOURWORDINLINE(0x203C, 0x0000, 0x0006, 0xABFE);
  961.  
  962. EXTERN_API( gxJob )
  963. GXUnflattenJobFromHdl            (gxJob                     aJob,
  964.                                  Handle                 aHdl)                                FOURWORDINLINE(0x203C, 0x0000, 0x0007, 0xABFE);
  965.  
  966. EXTERN_API( void )
  967. GXInstallApplicationOverride    (gxJob                     aJob,
  968.                                  short                     messageID,
  969.                                  void *                    override)                            FOURWORDINLINE(0x203C, 0x0000, 0x0008, 0xABFE);
  970.  
  971. EXTERN_API( Collection )
  972. GXGetJobCollection                (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001D, 0xABFE);
  973.  
  974. EXTERN_API( void *)
  975. GXGetJobRefCon                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001E, 0xABFE);
  976.  
  977. EXTERN_API( void )
  978. GXSetJobRefCon                    (gxJob                     aJob,
  979.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0000, 0x001F, 0xABFE);
  980.  
  981. EXTERN_API( gxJob )
  982. GXCopyJob                        (gxJob                     srcJob,
  983.                                  gxJob                     dstJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0020, 0xABFE);
  984.  
  985. EXTERN_API( void )
  986. GXSelectJobFormattingPrinter    (gxJob                     aJob,
  987.                                  Str31                     printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0021, 0xABFE);
  988.  
  989. EXTERN_API( void )
  990. GXSelectJobOutputPrinter        (gxJob                     aJob,
  991.                                  Str31                     printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0022, 0xABFE);
  992.  
  993. EXTERN_API( void )
  994. GXForEachJobFormatDo            (gxJob                     aJob,
  995.                                  GXFormatUPP             formatProc,
  996.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0000, 0x0023, 0xABFE);
  997.  
  998. EXTERN_API( long )
  999. GXCountJobFormats                (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0024, 0xABFE);
  1000.  
  1001. EXTERN_API( Boolean )
  1002. GXUpdateJob                        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0025, 0xABFE);
  1003.  
  1004. EXTERN_API( void )
  1005. GXConvertPrintRecord            (gxJob                     aJob,
  1006.                                  THPrint                 hPrint)                                FOURWORDINLINE(0x203C, 0x0000, 0x0026, 0xABFE);
  1007.  
  1008. EXTERN_API( void )
  1009. GXIdleJob                        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0057, 0xABFE);
  1010.  
  1011.  
  1012. /*
  1013.     Job Format Modes Routines
  1014. */
  1015. EXTERN_API( void )
  1016. GXSetAvailableJobFormatModes    (gxJob                     aJob,
  1017.                                  gxJobFormatModeTableHdl  formatModeTable)                    FOURWORDINLINE(0x203C, 0x0000, 0x003B, 0xABFE);
  1018.  
  1019. EXTERN_API( gxJobFormatMode )
  1020. GXGetPreferredJobFormatMode        (gxJob                     aJob,
  1021.                                  Boolean *                directOnly)                            FOURWORDINLINE(0x203C, 0x0000, 0x003C, 0xABFE);
  1022.  
  1023. EXTERN_API( gxJobFormatMode )
  1024. GXGetJobFormatMode                (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x003D, 0xABFE);
  1025.  
  1026. EXTERN_API( void )
  1027. GXSetJobFormatMode                (gxJob                     aJob,
  1028.                                  gxJobFormatMode         formatMode)                            FOURWORDINLINE(0x203C, 0x0000, 0x003E, 0xABFE);
  1029.  
  1030. EXTERN_API( void )
  1031. GXJobFormatModeQuery            (gxJob                     aJob,
  1032.                                  gxQueryType             aQueryType,
  1033.                                  void *                    srcData,
  1034.                                  void *                    dstData)                            FOURWORDINLINE(0x203C, 0x0000, 0x003F, 0xABFE);
  1035.  
  1036.  
  1037. /*
  1038.     Format Routines
  1039. */
  1040. EXTERN_API( gxFormat )
  1041. GXNewFormat                        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0009, 0xABFE);
  1042.  
  1043. EXTERN_API( void )
  1044. GXDisposeFormat                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x000A, 0xABFE);
  1045.  
  1046. EXTERN_API( gxFormat )
  1047. GXGetJobFormat                    (gxJob                     aJob,
  1048.                                  long                     whichFormat)                        FOURWORDINLINE(0x203C, 0x0000, 0x0013, 0xABFE);
  1049.  
  1050. EXTERN_API( gxJob )
  1051. GXGetFormatJob                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xABFE);
  1052.  
  1053. EXTERN_API( gxPaperType )
  1054. GXGetFormatPaperType            (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0015, 0xABFE);
  1055.  
  1056. EXTERN_API( void )
  1057. GXGetFormatDimensions            (gxFormat                 aFormat,
  1058.                                  gxRectangle *            pageSize,
  1059.                                  gxRectangle *            paperSize)                            FOURWORDINLINE(0x203C, 0x0000, 0x0016, 0xABFE);
  1060.  
  1061. EXTERN_API( Collection )
  1062. GXGetFormatCollection            (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0033, 0xABFE);
  1063.  
  1064. EXTERN_API( void )
  1065. GXChangedFormat                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0034, 0xABFE);
  1066.  
  1067. EXTERN_API( gxFormat )
  1068. GXCopyFormat                    (gxFormat                 srcFormat,
  1069.                                  gxFormat                 dstFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0035, 0xABFE);
  1070.  
  1071. EXTERN_API( gxFormat )
  1072. GXCloneFormat                    (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0036, 0xABFE);
  1073.  
  1074. EXTERN_API( long )
  1075. GXCountFormatOwners                (gxFormat                 aFormat)                            FOURWORDINLINE(0x203C, 0x0000, 0x0037, 0xABFE);
  1076.  
  1077. EXTERN_API( void )
  1078. GXGetFormatMapping                (gxFormat                 aFormat,
  1079.                                  gxMapping *            fmtMapping)                            FOURWORDINLINE(0x203C, 0x0000, 0x0038, 0xABFE);
  1080.  
  1081. EXTERN_API( gxShape )
  1082. GXGetFormatForm                    (gxFormat                 aFormat,
  1083.                                  gxShape *                mask)                                FOURWORDINLINE(0x203C, 0x0000, 0x0039, 0xABFE);
  1084.  
  1085. EXTERN_API( void )
  1086. GXSetFormatForm                    (gxFormat                 aFormat,
  1087.                                  gxShape                 form,
  1088.                                  gxShape                 mask)                                FOURWORDINLINE(0x203C, 0x0000, 0x003A, 0xABFE);
  1089.  
  1090.  
  1091. /*
  1092.     PaperType Routines
  1093. */
  1094. EXTERN_API( gxPaperType )
  1095. GXNewPaperType                    (gxJob                     aJob,
  1096.                                  Str31                     name,
  1097.                                  gxRectangle *            pageSize,
  1098.                                  gxRectangle *            paperSize)                            FOURWORDINLINE(0x203C, 0x0000, 0x000B, 0xABFE);
  1099.  
  1100. EXTERN_API( void )
  1101. GXDisposePaperType                (gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xABFE);
  1102.  
  1103. EXTERN_API( gxPaperType )
  1104. GXGetNewPaperType                (gxJob                     aJob,
  1105.                                  short                     resID)                                FOURWORDINLINE(0x203C, 0x0000, 0x000D, 0xABFE);
  1106.  
  1107. EXTERN_API( long )
  1108. GXCountJobPaperTypes            (gxJob                     aJob,
  1109.                                  Boolean                 forFormatDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x0042, 0xABFE);
  1110.  
  1111. EXTERN_API( gxPaperType )
  1112. GXGetJobPaperType                (gxJob                     aJob,
  1113.                                  long                     whichPaperType,
  1114.                                  Boolean                 forFormatDevice,
  1115.                                  gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x0043, 0xABFE);
  1116.  
  1117. EXTERN_API( void )
  1118. GXForEachJobPaperTypeDo            (gxJob                     aJob,
  1119.                                  GXPaperTypeUPP         aProc,
  1120.                                  void *                    refCon,
  1121.                                  Boolean                 forFormattingPrinter)                FOURWORDINLINE(0x203C, 0x0000, 0x0044, 0xABFE);
  1122.  
  1123. EXTERN_API( gxPaperType )
  1124. GXCopyPaperType                    (gxPaperType             srcPaperType,
  1125.                                  gxPaperType             dstPaperType)                        FOURWORDINLINE(0x203C, 0x0000, 0x0045, 0xABFE);
  1126.  
  1127. EXTERN_API( void )
  1128. GXGetPaperTypeName                (gxPaperType             aPaperType,
  1129.                                  Str31                     papertypeName)                        FOURWORDINLINE(0x203C, 0x0000, 0x0046, 0xABFE);
  1130.  
  1131. EXTERN_API( void )
  1132. GXGetPaperTypeDimensions        (gxPaperType             aPaperType,
  1133.                                  gxRectangle *            pageSize,
  1134.                                  gxRectangle *            paperSize)                            FOURWORDINLINE(0x203C, 0x0000, 0x0047, 0xABFE);
  1135.  
  1136. EXTERN_API( gxJob )
  1137. GXGetPaperTypeJob                (gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x0048, 0xABFE);
  1138.  
  1139. EXTERN_API( Collection )
  1140. GXGetPaperTypeCollection        (gxPaperType             aPaperType)                            FOURWORDINLINE(0x203C, 0x0000, 0x0049, 0xABFE);
  1141.  
  1142.  
  1143. /*
  1144.     Printer Routines
  1145. */
  1146. EXTERN_API( gxPrinter )
  1147. GXGetJobFormattingPrinter        (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0027, 0xABFE);
  1148.  
  1149. EXTERN_API( gxPrinter )
  1150. GXGetJobOutputPrinter            (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0028, 0xABFE);
  1151.  
  1152. EXTERN_API( gxPrinter )
  1153. GXGetJobPrinter                    (gxJob                     aJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x0029, 0xABFE);
  1154.  
  1155. EXTERN_API( gxJob )
  1156. GXGetPrinterJob                    (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x002A, 0xABFE);
  1157.  
  1158. EXTERN_API( void )
  1159. GXForEachPrinterViewDeviceDo    (gxPrinter                 aPrinter,
  1160.                                  GXViewDeviceUPP         aProc,
  1161.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0000, 0x002B, 0xABFE);
  1162.  
  1163. EXTERN_API( long )
  1164. GXCountPrinterViewDevices        (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x002C, 0xABFE);
  1165.  
  1166. EXTERN_API( gxViewDevice )
  1167. GXGetPrinterViewDevice            (gxPrinter                 aPrinter,
  1168.                                  long                     whichViewDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x002D, 0xABFE);
  1169.  
  1170. EXTERN_API( void )
  1171. GXSelectPrinterViewDevice        (gxPrinter                 aPrinter,
  1172.                                  long                     whichViewDevice)                    FOURWORDINLINE(0x203C, 0x0000, 0x002E, 0xABFE);
  1173.  
  1174. EXTERN_API( void )
  1175. GXGetPrinterName                (gxPrinter                 aPrinter,
  1176.                                  Str31                     printerName)                        FOURWORDINLINE(0x203C, 0x0000, 0x002F, 0xABFE);
  1177.  
  1178. EXTERN_API( OSType )
  1179. GXGetPrinterType                (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x0030, 0xABFE);
  1180.  
  1181. EXTERN_API( void )
  1182. GXGetPrinterDriverName            (gxPrinter                 aPrinter,
  1183.                                  Str31                     driverName)                            FOURWORDINLINE(0x203C, 0x0000, 0x0031, 0xABFE);
  1184.  
  1185. EXTERN_API( OSType )
  1186. GXGetPrinterDriverType            (gxPrinter                 aPrinter)                            FOURWORDINLINE(0x203C, 0x0000, 0x0032, 0xABFE);
  1187.  
  1188.  
  1189. /*
  1190.     Dialog Routines
  1191. */
  1192. EXTERN_API( gxDialogResult )
  1193. GXJobDefaultFormatDialog        (gxJob                     aJob,
  1194.                                  gxEditMenuRecord *        anEditMenuRec)                        FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xABFE);
  1195.  
  1196. EXTERN_API( gxDialogResult )
  1197. GXJobPrintDialog                (gxJob                     aJob,
  1198.                                  gxEditMenuRecord *        anEditMenuRec)                        FOURWORDINLINE(0x203C, 0x0000, 0x0011, 0xABFE);
  1199.  
  1200. EXTERN_API( gxDialogResult )
  1201. GXFormatDialog                    (gxFormat                 aFormat,
  1202.                                  gxEditMenuRecord *        anEditMenuRec,
  1203.                                  StringPtr                 title)                                FOURWORDINLINE(0x203C, 0x0000, 0x0012, 0xABFE);
  1204.  
  1205. EXTERN_API( void )
  1206. GXEnableJobScalingPanel            (gxJob                     aJob,
  1207.                                  Boolean                 enabled)                            FOURWORDINLINE(0x203C, 0x0000, 0x0040, 0xABFE);
  1208.  
  1209. EXTERN_API( void )
  1210. GXGetJobPanelDimensions            (gxJob                     aJob,
  1211.                                  Rect *                    panelArea)                            FOURWORDINLINE(0x203C, 0x0000, 0x0041, 0xABFE);
  1212.  
  1213.  
  1214. /*
  1215.     Spooling Routines
  1216. */
  1217. EXTERN_API( void )
  1218. GXGetJobPageRange                (gxJob                     theJob,
  1219.                                  long *                    firstPage,
  1220.                                  long *                    lastPage)                            FOURWORDINLINE(0x203C, 0x0000, 0x0017, 0xABFE);
  1221.  
  1222. EXTERN_API( void )
  1223. GXStartJob                        (gxJob                     theJob,
  1224.                                  StringPtr                 docName,
  1225.                                  long                     pageCount)                            FOURWORDINLINE(0x203C, 0x0000, 0x0018, 0xABFE);
  1226.  
  1227. EXTERN_API( void )
  1228. GXPrintPage                        (gxJob                     theJob,
  1229.                                  long                     pageNumber,
  1230.                                  gxFormat                 theFormat,
  1231.                                  gxShape                 thePage)                            FOURWORDINLINE(0x203C, 0x0000, 0x0019, 0xABFE);
  1232.  
  1233. EXTERN_API( Boolean )
  1234. GXStartPage                        (gxJob                     theJob,
  1235.                                  long                     pageNumber,
  1236.                                  gxFormat                 theFormat,
  1237.                                  long                     numViewPorts,
  1238.                                  gxViewPort *            viewPortList)                        FOURWORDINLINE(0x203C, 0x0000, 0x001A, 0xABFE);
  1239.  
  1240. EXTERN_API( void )
  1241. GXFinishPage                    (gxJob                     theJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001B, 0xABFE);
  1242.  
  1243. EXTERN_API( void )
  1244. GXFinishJob                        (gxJob                     theJob)                                FOURWORDINLINE(0x203C, 0x0000, 0x001C, 0xABFE);
  1245.  
  1246.  
  1247. /*
  1248.     PrintFile Routines
  1249. */
  1250. EXTERN_API( gxPrintFile )
  1251. GXOpenPrintFile                    (gxJob                     theJob,
  1252.                                  FSSpecPtr                 anFSSpec,
  1253.                                  char                     permission)                            FOURWORDINLINE(0x203C, 0x0000, 0x004A, 0xABFE);
  1254.  
  1255. EXTERN_API( void )
  1256. GXClosePrintFile                (gxPrintFile             aPrintFile)                            FOURWORDINLINE(0x203C, 0x0000, 0x004B, 0xABFE);
  1257.  
  1258. EXTERN_API( gxJob )
  1259. GXGetPrintFileJob                (gxPrintFile             aPrintFile)                            FOURWORDINLINE(0x203C, 0x0000, 0x004C, 0xABFE);
  1260.  
  1261. EXTERN_API( long )
  1262. GXCountPrintFilePages            (gxPrintFile             aPrintFile)                            FOURWORDINLINE(0x203C, 0x0000, 0x004D, 0xABFE);
  1263.  
  1264. EXTERN_API( void )
  1265. GXReadPrintFilePage                (gxPrintFile             aPrintFile,
  1266.                                  long                     pageNumber,
  1267.                                  long                     numViewPorts,
  1268.                                  gxViewPort *            viewPortList,
  1269.                                  gxFormat *                pgFormat,
  1270.                                  gxShape *                pgShape)                            FOURWORDINLINE(0x203C, 0x0000, 0x004E, 0xABFE);
  1271.  
  1272. EXTERN_API( void )
  1273. GXReplacePrintFilePage            (gxPrintFile             aPrintFile,
  1274.                                  long                     pageNumber,
  1275.                                  gxFormat                 aFormat,
  1276.                                  gxShape                 aShape)                                FOURWORDINLINE(0x203C, 0x0000, 0x004F, 0xABFE);
  1277.  
  1278. EXTERN_API( void )
  1279. GXInsertPrintFilePage            (gxPrintFile             aPrintFile,
  1280.                                  long                     atPageNumber,
  1281.                                  gxFormat                 pgFormat,
  1282.                                  gxShape                 pgShape)                            FOURWORDINLINE(0x203C, 0x0000, 0x0050, 0xABFE);
  1283.  
  1284. EXTERN_API( void )
  1285. GXDeletePrintFilePageRange        (gxPrintFile             aPrintFile,
  1286.                                  long                     fromPageNumber,
  1287.                                  long                     toPageNumber)                        FOURWORDINLINE(0x203C, 0x0000, 0x0051, 0xABFE);
  1288.  
  1289. EXTERN_API( void )
  1290. GXSavePrintFile                    (gxPrintFile             aPrintFile,
  1291.                                  FSSpec *                anFSSpec)                            FOURWORDINLINE(0x203C, 0x0000, 0x0052, 0xABFE);
  1292.  
  1293.  
  1294. /*
  1295.     ColorSync Routines
  1296. */
  1297. EXTERN_API( long )
  1298. GXFindPrinterProfile            (gxPrinter                 aPrinter,
  1299.                                  void *                    searchData,
  1300.                                  long                     index,
  1301.                                  gxColorProfile *        returnedProfile)                    FOURWORDINLINE(0x203C, 0x0000, 0x0053, 0xABFE);
  1302.  
  1303. EXTERN_API( long )
  1304. GXFindFormatProfile                (gxFormat                 aFormat,
  1305.                                  void *                    searchData,
  1306.                                  long                     index,
  1307.                                  gxColorProfile *        returnedProfile)                    FOURWORDINLINE(0x203C, 0x0000, 0x0054, 0xABFE);
  1308.  
  1309. EXTERN_API( void )
  1310. GXSetPrinterProfile                (gxPrinter                 aPrinter,
  1311.                                  gxColorProfile         oldProfile,
  1312.                                  gxColorProfile         newProfile)                            FOURWORDINLINE(0x203C, 0x0000, 0x0055, 0xABFE);
  1313.  
  1314. EXTERN_API( void )
  1315. GXSetFormatProfile                (gxFormat                 aFormat,
  1316.                                  gxColorProfile         oldProfile,
  1317.                                  gxColorProfile         newProfile)                            FOURWORDINLINE(0x203C, 0x0000, 0x0056, 0xABFE);
  1318.  
  1319.  
  1320. /************************************************************************
  1321.                         Start of old "GXPrintingResEquates.h/a/p" interface file.
  1322.                 *************************************************************************/
  1323. /*    ------------------------------------
  1324.                 Basic client types
  1325.     ------------------------------------ */
  1326. enum {
  1327.     gxPrintingManagerType        = FOUR_CHAR_CODE('pmgr'),
  1328.     gxImagingSystemType            = FOUR_CHAR_CODE('gxis'),
  1329.     gxPrinterDriverType            = FOUR_CHAR_CODE('pdvr'),
  1330.     gxPrintingExtensionType        = FOUR_CHAR_CODE('pext'),
  1331.     gxUnknownPrinterType        = FOUR_CHAR_CODE('none'),
  1332.     gxAnyPrinterType            = FOUR_CHAR_CODE('univ'),
  1333.     gxQuickdrawPrinterType        = FOUR_CHAR_CODE('qdrw'),
  1334.     gxPortableDocPrinterType    = FOUR_CHAR_CODE('gxpd'),
  1335.     gxRasterPrinterType            = FOUR_CHAR_CODE('rast'),
  1336.     gxPostscriptPrinterType        = FOUR_CHAR_CODE('post'),
  1337.     gxVectorPrinterType            = FOUR_CHAR_CODE('vect')
  1338. };
  1339.  
  1340. /* All pre-defined printing collection items have this ID */
  1341. enum {
  1342.     gxPrintingTagID                = -28672
  1343. };
  1344.  
  1345.  
  1346. /*    ----------------------------------------------------------------------
  1347.  
  1348.         Resource types and IDs used by both extension and driver writers
  1349.  
  1350.     ---------------------------------------------------------------------- */
  1351. /* Resources in a printer driver or extension must be based off of these IDs */
  1352. enum {
  1353.     gxPrintingDriverBaseID        = -27648,
  1354.     gxPrintingExtensionBaseID    = -27136
  1355. };
  1356.  
  1357. /*    Override resources tell the system what messages a driver or extension
  1358.         is overriding.  A driver may have a series of these resources. */
  1359. /* Override resource type for 68k resource-based code:*/
  1360.  
  1361. enum {
  1362.     gxOverrideType                = FOUR_CHAR_CODE('over')
  1363. };
  1364.  
  1365.  
  1366. /* Override resource type for PowerPC datafork-based code:*/
  1367.  
  1368. enum {
  1369.     gxNativeOverrideType        = FOUR_CHAR_CODE('povr')
  1370. };
  1371.  
  1372.  
  1373. /*    --------------------------------------------------------------
  1374.  
  1375.         Message ID definitions by both extension and driver writers
  1376.  
  1377.     --------------------------------------------------------------- */
  1378. /* Identifiers for universal message overrides. */
  1379. enum {
  1380.     gxInitializeMsg                = 0,
  1381.     gxShutDownMsg                = 1,
  1382.     gxJobIdleMsg                = 2,
  1383.     gxJobStatusMsg                = 3,
  1384.     gxPrintingEventMsg            = 4,
  1385.     gxJobDefaultFormatDialogMsg    = 5,
  1386.     gxFormatDialogMsg            = 6,
  1387.     gxJobPrintDialogMsg            = 7,
  1388.     gxFilterPanelEventMsg        = 8,
  1389.     gxHandlePanelEventMsg        = 9,
  1390.     gxParsePageRangeMsg            = 10,
  1391.     gxDefaultJobMsg                = 11,
  1392.     gxDefaultFormatMsg            = 12,
  1393.     gxDefaultPaperTypeMsg        = 13,
  1394.     gxDefaultPrinterMsg            = 14,
  1395.     gxCreateSpoolFileMsg        = 15,
  1396.     gxSpoolPageMsg                = 16,
  1397.     gxSpoolDataMsg                = 17,
  1398.     gxSpoolResourceMsg            = 18,
  1399.     gxCompleteSpoolFileMsg        = 19,
  1400.     gxCountPagesMsg                = 20,
  1401.     gxDespoolPageMsg            = 21,
  1402.     gxDespoolDataMsg            = 22,
  1403.     gxDespoolResourceMsg        = 23,
  1404.     gxCloseSpoolFileMsg            = 24,
  1405.     gxStartJobMsg                = 25,
  1406.     gxFinishJobMsg                = 26,
  1407.     gxStartPageMsg                = 27,
  1408.     gxFinishPageMsg                = 28,
  1409.     gxPrintPageMsg                = 29,
  1410.     gxSetupImageDataMsg            = 30,
  1411.     gxImageJobMsg                = 31,
  1412.     gxImageDocumentMsg            = 32,
  1413.     gxImagePageMsg                = 33,
  1414.     gxRenderPageMsg                = 34,
  1415.     gxCreateImageFileMsg        = 35,
  1416.     gxOpenConnectionMsg            = 36,
  1417.     gxCloseConnectionMsg        = 37,
  1418.     gxStartSendPageMsg            = 38,
  1419.     gxFinishSendPageMsg            = 39,
  1420.     gxWriteDataMsg                = 40,
  1421.     gxBufferDataMsg                = 41,
  1422.     gxDumpBufferMsg                = 42,
  1423.     gxFreeBufferMsg                = 43,
  1424.     gxCheckStatusMsg            = 44,
  1425.     gxGetDeviceStatusMsg        = 45,
  1426.     gxFetchTaggedDataMsg        = 46,
  1427.     gxGetDTPMenuListMsg            = 47,
  1428.     gxDTPMenuSelectMsg            = 48,
  1429.     gxHandleAlertFilterMsg        = 49,
  1430.     gxJobFormatModeQueryMsg        = 50,
  1431.     gxWriteStatusToDTPWindowMsg    = 51,
  1432.     gxInitializeStatusAlertMsg    = 52,
  1433.     gxHandleAlertStatusMsg        = 53,
  1434.     gxHandleAlertEventMsg        = 54,
  1435.     gxCleanupStartJobMsg        = 55,
  1436.     gxCleanupStartPageMsg        = 56,
  1437.     gxCleanupOpenConnectionMsg    = 57,
  1438.     gxCleanupStartSendPageMsg    = 58,
  1439.     gxDefaultDesktopPrinterMsg    = 59,
  1440.     gxCaptureOutputDeviceMsg    = 60,
  1441.     gxOpenConnectionRetryMsg    = 61,
  1442.     gxExamineSpoolFileMsg        = 62,
  1443.     gxFinishSendPlaneMsg        = 63,
  1444.     gxDoesPaperFitMsg            = 64,
  1445.     gxChooserMessageMsg            = 65,
  1446.     gxFindPrinterProfileMsg        = 66,
  1447.     gxFindFormatProfileMsg        = 67,
  1448.     gxSetPrinterProfileMsg        = 68,
  1449.     gxSetFormatProfileMsg        = 69,
  1450.     gxHandleAltDestinationMsg    = 70,
  1451.     gxSetupPageImageDataMsg        = 71
  1452. };
  1453.  
  1454.  
  1455. /* Identifiers for Quickdraw message overrides. */
  1456. enum {
  1457.     gxPrOpenDocMsg                = 0,
  1458.     gxPrCloseDocMsg                = 1,
  1459.     gxPrOpenPageMsg                = 2,
  1460.     gxPrClosePageMsg            = 3,
  1461.     gxPrintDefaultMsg            = 4,
  1462.     gxPrStlDialogMsg            = 5,
  1463.     gxPrJobDialogMsg            = 6,
  1464.     gxPrStlInitMsg                = 7,
  1465.     gxPrJobInitMsg                = 8,
  1466.     gxPrDlgMainMsg                = 9,
  1467.     gxPrValidateMsg                = 10,
  1468.     gxPrJobMergeMsg                = 11,
  1469.     gxPrGeneralMsg                = 12,
  1470.     gxConvertPrintRecordToMsg    = 13,
  1471.     gxConvertPrintRecordFromMsg    = 14,
  1472.     gxPrintRecordToJobMsg        = 15
  1473. };
  1474.  
  1475.  
  1476. /* Identifiers for raster imaging message overrides. */
  1477. enum {
  1478.     gxRasterDataInMsg            = 0,
  1479.     gxRasterLineFeedMsg            = 1,
  1480.     gxRasterPackageBitmapMsg    = 2
  1481. };
  1482.  
  1483.  
  1484. /* Identifiers for PostScript imaging message overrides. */
  1485. enum {
  1486.     gxPostscriptQueryPrinterMsg    = 0,
  1487.     gxPostscriptInitializePrinterMsg = 1,
  1488.     gxPostscriptResetPrinterMsg    = 2,
  1489.     gxPostscriptExitServerMsg    = 3,
  1490.     gxPostscriptGetStatusTextMsg = 4,
  1491.     gxPostscriptGetPrinterTextMsg = 5,
  1492.     gxPostscriptScanStatusTextMsg = 6,
  1493.     gxPostscriptScanPrinterTextMsg = 7,
  1494.     gxPostscriptGetDocumentProcSetListMsg = 8,
  1495.     gxPostscriptDownloadProcSetListMsg = 9,
  1496.     gxPostscriptGetPrinterGlyphsInformationMsg = 10,
  1497.     gxPostscriptStreamFontMsg    = 11,
  1498.     gxPostscriptDoDocumentHeaderMsg = 12,
  1499.     gxPostscriptDoDocumentSetUpMsg = 13,
  1500.     gxPostscriptDoDocumentTrailerMsg = 14,
  1501.     gxPostscriptDoPageSetUpMsg    = 15,
  1502.     gxPostscriptSelectPaperTypeMsg = 16,
  1503.     gxPostscriptDoPageTrailerMsg = 17,
  1504.     gxPostscriptEjectPageMsg    = 18,
  1505.     gxPostscriptProcessShapeMsg    = 19,
  1506.     gxPostScriptEjectPendingPageMsg = 20
  1507. };
  1508.  
  1509.  
  1510. /* Identifiers for Vector imaging message overrides. */
  1511. enum {
  1512.     gxVectorPackageDataMsg        = 0,
  1513.     gxVectorLoadPensMsg            = 1,
  1514.     gxVectorVectorizeShapeMsg    = 2
  1515. };
  1516.  
  1517.  
  1518. /* Dialog related resource types */
  1519. enum {
  1520.     gxPrintingAlertType            = FOUR_CHAR_CODE('plrt'),
  1521.     gxStatusType                = FOUR_CHAR_CODE('stat'),
  1522.     gxExtendedDITLType            = FOUR_CHAR_CODE('xdtl'),
  1523.     gxPrintPanelType            = FOUR_CHAR_CODE('ppnl'),
  1524.     gxCollectionType            = FOUR_CHAR_CODE('cltn')
  1525. };
  1526.  
  1527.  
  1528. /* Communication resource types */
  1529. /*
  1530.     The looker resource is used by the Chooser PACK to determine what kind
  1531.     of communications this driver supports. (In order to generate/handle the 
  1532.     pop-up menu for "Connect via:".
  1533.     
  1534.     The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
  1535.     for servers created for this driver.
  1536. */
  1537. enum {
  1538.     gxLookerType                = FOUR_CHAR_CODE('look'),
  1539.     gxLookerID                    = -4096
  1540. };
  1541.  
  1542.  
  1543. /* The communications method and private data used to connect to the printer */
  1544. enum {
  1545.     gxDeviceCommunicationsType    = FOUR_CHAR_CODE('comm')
  1546. };
  1547.  
  1548. /*    -------------------------------------------------
  1549.  
  1550.     Resource types and IDs used by extension writers
  1551.  
  1552.     ------------------------------------------------- */
  1553. enum {
  1554.     gxExtensionUniversalOverrideID = gxPrintingExtensionBaseID
  1555. };
  1556.  
  1557. enum {
  1558.     gxExtensionImagingOverrideSelectorID = gxPrintingExtensionBaseID
  1559. };
  1560.  
  1561. enum {
  1562.     gxExtensionScopeType        = FOUR_CHAR_CODE('scop'),
  1563.     gxDriverScopeID                = gxPrintingExtensionBaseID,
  1564.     gxPrinterScopeID            = gxPrintingExtensionBaseID + 1,
  1565.     gxPrinterExceptionScopeID    = gxPrintingExtensionBaseID + 2
  1566. };
  1567.  
  1568. enum {
  1569.     gxExtensionLoadType            = FOUR_CHAR_CODE('load'),
  1570.     gxExtensionLoadID            = gxPrintingExtensionBaseID
  1571. };
  1572.  
  1573. enum {
  1574.     gxExtensionLoadFirst        = 0x00000100,
  1575.     gxExtensionLoadAnywhere        = 0x7FFFFFFF,
  1576.     gxExtensionLoadLast            = (long)0xFFFFFF00
  1577. };
  1578.  
  1579. enum {
  1580.     gxExtensionOptimizationType    = FOUR_CHAR_CODE('eopt'),
  1581.     gxExtensionOptimizationID    = gxPrintingExtensionBaseID
  1582. };
  1583.  
  1584.  
  1585. /*    -----------------------------------------------
  1586.  
  1587.     Resource types and IDs used by driver writers
  1588.  
  1589.     ----------------------------------------------- */
  1590. enum {
  1591.     gxDriverUniversalOverrideID    = gxPrintingDriverBaseID,
  1592.     gxDriverImagingOverrideID    = gxPrintingDriverBaseID + 1,
  1593.     gxDriverCompatibilityOverrideID = gxPrintingDriverBaseID + 2
  1594. };
  1595.  
  1596. enum {
  1597.     gxDriverFileFormatType        = FOUR_CHAR_CODE('pfil'),
  1598.     gxDriverFileFormatID        = gxPrintingDriverBaseID
  1599. };
  1600.  
  1601.  
  1602. enum {
  1603.     gxDestinationAdditionType    = FOUR_CHAR_CODE('dsta'),
  1604.     gxDestinationAdditionID        = gxPrintingDriverBaseID
  1605. };
  1606.  
  1607.  
  1608. /* IMAGING RESOURCES */
  1609. /*    The imaging system resource specifies which imaging system a printer
  1610.         driver wishes to use. */
  1611.  
  1612. enum {
  1613.     gxImagingSystemSelectorType    = FOUR_CHAR_CODE('isys'),
  1614.     gxImagingSystemSelectorID    = gxPrintingDriverBaseID
  1615. };
  1616.  
  1617.  
  1618. /* 'exft' resource ID -- exclude font list */
  1619. enum {
  1620.     kExcludeFontListType        = FOUR_CHAR_CODE('exft'),
  1621.     kExcludeFontListID            = gxPrintingDriverBaseID
  1622. };
  1623.  
  1624. /* Resource for type for color matching */
  1625. enum {
  1626.     gxColorMatchingDataType        = FOUR_CHAR_CODE('prof'),
  1627.     gxColorMatchingDataID        = gxPrintingDriverBaseID
  1628. };
  1629.  
  1630.  
  1631. /* Resource type and id for the tray count */
  1632. enum {
  1633.     gxTrayCountDataType            = FOUR_CHAR_CODE('tray'),
  1634.     gxTrayCountDataID            = gxPrintingDriverBaseID
  1635. };
  1636.  
  1637.  
  1638. /* Resource type for the tray names */
  1639. enum {
  1640.     gxTrayNameDataType            = FOUR_CHAR_CODE('tryn')
  1641. };
  1642.  
  1643.  
  1644. /* Resource type for manual feed preferences, stored in DTP. */
  1645. enum {
  1646.     gxManualFeedAlertPrefsType    = FOUR_CHAR_CODE('mfpr'),
  1647.     gxManualFeedAlertPrefsID    = gxPrintingDriverBaseID
  1648. };
  1649.  
  1650. /* Resource type for desktop printer output characteristics, stored in DTP. */
  1651. enum {
  1652.     gxDriverOutputType            = FOUR_CHAR_CODE('outp'),
  1653.     gxDriverOutputTypeID        = 1
  1654. };
  1655.  
  1656.  
  1657. /* IO Resources */
  1658. /* Resource type and ID for default IO and buffering resources */
  1659. enum {
  1660.     gxUniversalIOPrefsType        = FOUR_CHAR_CODE('iobm'),
  1661.     gxUniversalIOPrefsID        = gxPrintingDriverBaseID
  1662. };
  1663.  
  1664.  
  1665. /*    Resource types and IDs for default implementation of CaptureOutputDevice.
  1666.         The default implementation of CaptureOutputDevice only handles PAP devices */
  1667. enum {
  1668.     gxCaptureType                = FOUR_CHAR_CODE('cpts'),
  1669.     gxCaptureStringID            = gxPrintingDriverBaseID,
  1670.     gxReleaseStringID            = gxPrintingDriverBaseID + 1,
  1671.     gxUncapturedAppleTalkType    = gxPrintingDriverBaseID + 2,
  1672.     gxCapturedAppleTalkType        = gxPrintingDriverBaseID + 3
  1673. };
  1674.  
  1675.  
  1676. /* Resource type and ID for custom halftone matrix */
  1677. enum {
  1678.     gxCustomMatrixType            = FOUR_CHAR_CODE('dmat'),
  1679.     gxCustomMatrixID            = gxPrintingDriverBaseID
  1680. };
  1681.  
  1682. /* Resource type and ID for raster driver rendering preferences */
  1683. enum {
  1684.     gxRasterPrefsType            = FOUR_CHAR_CODE('rdip'),
  1685.     gxRasterPrefsID                = gxPrintingDriverBaseID
  1686. };
  1687.  
  1688.  
  1689. /* Resource type for specifiying a colorset */
  1690. enum {
  1691.     gxColorSetResType            = FOUR_CHAR_CODE('crst')
  1692. };
  1693.  
  1694.  
  1695. /* Resource type and ID for raster driver packaging preferences */
  1696. enum {
  1697.     gxRasterPackType            = FOUR_CHAR_CODE('rpck'),
  1698.     gxRasterPackID                = gxPrintingDriverBaseID
  1699. };
  1700.  
  1701.  
  1702. /* Resource type and ID for raster driver packaging options */
  1703.  
  1704. enum {
  1705.     gxRasterNumNone                = 0,                            /* Number isn't output at all */
  1706.     gxRasterNumDirect            = 1,                            /* Lowest minWidth bytes as data */
  1707.     gxRasterNumToASCII            = 2                                /* minWidth ASCII characters */
  1708. };
  1709.  
  1710.  
  1711. enum {
  1712.     gxRasterPackOptionsType        = FOUR_CHAR_CODE('ropt'),
  1713.     gxRasterPackOptionsID        = gxPrintingDriverBaseID
  1714. };
  1715.  
  1716.  
  1717. /* Resource type for the PostScript imaging system procedure set control resource */
  1718. enum {
  1719.     gxPostscriptProcSetControlType = FOUR_CHAR_CODE('prec')
  1720. };
  1721.  
  1722.  
  1723. /* Resource type for the PostScript imaging system printer font resource */
  1724. enum {
  1725.     gxPostscriptPrinterFontType    = FOUR_CHAR_CODE('pfnt')
  1726. };
  1727.  
  1728.  
  1729. /* Resource type and ID for the PostScript imaging system imaging preferences */
  1730. enum {
  1731.     gxPostscriptPrefsType        = FOUR_CHAR_CODE('pdip'),
  1732.     gxPostscriptPrefsID            = gxPrintingDriverBaseID
  1733. };
  1734.  
  1735. /* Resource type and ID for the PostScript imaging system default scanning code */
  1736. enum {
  1737.     gxPostscriptScanningType    = FOUR_CHAR_CODE('scan'),
  1738.     gxPostscriptScanningID        = gxPrintingDriverBaseID
  1739. };
  1740.  
  1741.  
  1742. /* Old Application Support Resources */
  1743. enum {
  1744.     gxCustType                    = FOUR_CHAR_CODE('cust'),
  1745.     gxCustID                    = -8192
  1746. };
  1747.  
  1748.  
  1749. enum {
  1750.     gxReslType                    = FOUR_CHAR_CODE('resl'),
  1751.     gxReslID                    = -8192
  1752. };
  1753.  
  1754.  
  1755. enum {
  1756.     gxDiscreteResolution        = 0
  1757. };
  1758.  
  1759.  
  1760. enum {
  1761.     gxStlDialogResID            = -8192
  1762. };
  1763.  
  1764.  
  1765. enum {
  1766.     gxJobDialogResID            = -8191
  1767. };
  1768.  
  1769.  
  1770. enum {
  1771.     gxScaleTableType            = FOUR_CHAR_CODE('stab'),
  1772.     gxDITLControlType            = FOUR_CHAR_CODE('dctl')
  1773. };
  1774.  
  1775. /*    The default implementation of gxPrintDefault loads and
  1776.     PrValidates a print record stored in the following driver resource. */
  1777. enum {
  1778.     gxPrintRecordType            = FOUR_CHAR_CODE('PREC'),
  1779.     gxDefaultPrintRecordID        = 0
  1780. };
  1781.  
  1782.  
  1783. /*
  1784.     -----------------------------------------------
  1785.  
  1786.     Resource types and IDs used in papertype files
  1787.  
  1788.     -----------------------------------------------
  1789. */
  1790. /* Resource type and ID for driver papertypes placed in individual files */
  1791. enum {
  1792.     gxSignatureType                = FOUR_CHAR_CODE('sig '),
  1793.     gxPapertypeSignatureID        = 0
  1794. };
  1795.  
  1796.  
  1797. /* Papertype creator types */
  1798. enum {
  1799.     gxDrvrPaperType                = FOUR_CHAR_CODE('drpt'),
  1800.     gxSysPaperType                = FOUR_CHAR_CODE('sypt'),        /* System paper type creator */
  1801.     gxUserPaperType                = FOUR_CHAR_CODE('uspt'),        /* User paper type creator */
  1802.                                                                 /* Driver creator types == driver file's creator value */
  1803.     gxPaperTypeType                = FOUR_CHAR_CODE('ptyp')
  1804. };
  1805.  
  1806.  
  1807. /*********************************************************************
  1808.                     Start of old "GXPrintingMessages.h/a/p" interface file.
  1809.             **********************************************************************/
  1810. /* ------------------------------------------------------------------------------
  1811.  
  1812.                                     Constants and Types
  1813.  
  1814. -------------------------------------------------------------------------------- */
  1815. /*
  1816.  
  1817.     ABSTRACT DATA TYPES
  1818.  
  1819. */
  1820. typedef struct OpaquegxSpoolFile*         gxSpoolFile;
  1821. /*
  1822.  
  1823.     DIALOG PANEL CONSTANTS AND TYPES
  1824.  
  1825. */
  1826.  
  1827. typedef long                             gxPanelEvent;
  1828. /* Dialog panel event equates */
  1829. enum {
  1830.     gxPanelNoEvt                = 0L,
  1831.     gxPanelOpenEvt                = 1L,                            /* Initialize and draw */
  1832.     gxPanelCloseEvt                = 2L,                            /* Your panel is going away (panel switchL, confirm or cancel) */
  1833.     gxPanelHitEvt                = 3L,                            /* There's a hit in your panel */
  1834.     gxPanelActivateEvt            = 4L,                            /* The dialog window has just been activated */
  1835.     gxPanelDeactivateEvt        = 5L,                            /* The dialog window is about to be deactivated */
  1836.     gxPanelIconFocusEvt            = 6L,                            /* The focus changes from the panel to the icon list */
  1837.     gxPanelPanelFocusEvt        = 7L,                            /* The focus changes from the icon list to the panel */
  1838.     gxPanelFilterEvt            = 8L,                            /* Every event is filtered */
  1839.     gxPanelCancelEvt            = 9L,                            /* The user has cancelled the dialog */
  1840.     gxPanelConfirmEvt            = 10L,                            /* The user has confirmed the dialog */
  1841.     gxPanelDialogEvt            = 11L,                            /* Event to be handle by dialoghandler */
  1842.     gxPanelOtherEvt                = 12L,                            /* osEvts, etc. */
  1843.     gxPanelUserWillConfirmEvt    = 13L                            /* User has selected confirm, time to parse panel interdependencies */
  1844. };
  1845.  
  1846.  
  1847. /* Constants for panel responses to dialog handler calls */
  1848. typedef long                             gxPanelResult;
  1849. enum {
  1850.     gxPanelNoResult                = 0,
  1851.     gxPanelCancelConfirmation    = 1                                /* Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away */
  1852. };
  1853.  
  1854.  
  1855. /* Panel event info record for FilterPanelEvent and HandlePanelEvent messages */
  1856.  
  1857. struct gxPanelInfoRecord {
  1858.     gxPanelEvent                     panelEvt;                    /* Why we were called */
  1859.     short                             panelResId;                    /* 'ppnl' resource ID of current panel */
  1860.     DialogPtr                         pDlg;                        /* Pointer to dialog */
  1861.     EventRecord *                    theEvent;                    /* Pointer to event */
  1862.     short                             itemHit;                    /* Actual item number as Dialog Mgr thinks */
  1863.     short                             itemCount;                    /* Number of items before your items */
  1864.     short                             evtAction;                    /* Once this event is processed, the action that will result */
  1865.                                                                 /* (evtAction is only meaningful during filtering) */
  1866.     short                             errorStringId;                /* STR ID of string to put in error alert (0 means no string) */
  1867.     gxFormat                         theFormat;                    /* The current format (only meaningful in a format dialog) */
  1868.     void *                            refCon;                        /* refCon passed in PanelSetupRecord */
  1869. };
  1870. typedef struct gxPanelInfoRecord        gxPanelInfoRecord;
  1871. /* Constants for the evtAction field in PanelInfoRecord */
  1872. enum {
  1873.     gxOtherAction                = 0,                            /* Current item will not change */
  1874.     gxClosePanelAction            = 1,                            /* Panel will be closed */
  1875.     gxCancelDialogAction        = 2,                            /* Dialog will be cancelled */
  1876.     gxConfirmDialogAction        = 3                                /* Dialog will be confirmed */
  1877. };
  1878.  
  1879.  
  1880. /* Constants for the panelKind field in gxPanelSetupRecord */
  1881.  
  1882. typedef long                             gxPrintingPanelKind;
  1883. /* The gxPanelSetupInfo structure is passed to GXSetupDialogPanel */
  1884.  
  1885. struct gxPanelSetupRecord {
  1886.     gxPrintingPanelKind             panelKind;
  1887.     short                             panelResId;
  1888.     short                             resourceRefNum;
  1889.     void *                            refCon;
  1890. };
  1891. typedef struct gxPanelSetupRecord        gxPanelSetupRecord;
  1892. enum {
  1893.     gxApplicationPanel            = 0L,
  1894.     gxExtensionPanel            = 1L,
  1895.     gxDriverPanel                = 2L
  1896. };
  1897.  
  1898.  
  1899. /* Constants returned by gxParsePageRange message */
  1900.  
  1901. typedef long                             gxParsePageRangeResult;
  1902. enum {
  1903.     gxRangeNotParsed            = 0L,                            /* Default initial value */
  1904.     gxRangeParsed                = 1L,                            /* Range has been parsed */
  1905.     gxRangeBadFromValue            = 2L,                            /* From value is bad */
  1906.     gxRangeBadToValue            = 3L                            /* To value is bad */
  1907. };
  1908.  
  1909. /*
  1910.  
  1911.     STATUS-RELATED CONSTANTS AND TYPES
  1912.  
  1913. */
  1914.  
  1915. /* Structure for status messages */
  1916.  
  1917. struct gxStatusRecord {
  1918.     unsigned short                     statusType;                    /* One of the ids listed above (nonFatalError, etc. ) */
  1919.     unsigned short                     statusId;                    /* Specific status (out of paper, etc.) */
  1920.     unsigned short                     statusAlertId;                /*    Printing alert ID (if any) for status */
  1921.     gxOwnerSignature                 statusOwner;                /* Creator type of status owner */
  1922.     short                             statResId;                    /* ID for 'stat' resource */
  1923.     short                             statResIndex;                /* Index into 'stat' resource for this status */
  1924.     short                             dialogResult;                /* ID of button string selected on dismissal of printing alert */
  1925.     unsigned short                     bufferLen;                    /* Number of bytes in status buffer - total record size must be <= 512 */
  1926.     char                             statusBuffer[1];            /* User response from alert */
  1927. };
  1928. typedef struct gxStatusRecord            gxStatusRecord;
  1929.  
  1930. /* Constants for statusType field of gxStatusRecord */
  1931. enum {
  1932.     gxNonFatalError                = 1,                            /* An error occurred, but the job can continue */
  1933.     gxFatalError                = 2,                            /* A fatal error occurred-- halt job */
  1934.     gxPrinterReady                = 3,                            /* Tells QDGX to leave alert mode */
  1935.     gxUserAttention                = 4,                            /* Signals initiation of a modal alert */
  1936.     gxUserAlert                    = 5,                            /* Signals initiation of a moveable modal alert */
  1937.     gxPageTransmission            = 6,                            /* Signals page sent to printer, increments page count in strings to user */
  1938.     gxOpenConnectionStatus        = 7,                            /* Signals QDGX to begin animation on printer icon */
  1939.     gxInformationalStatus        = 8,                            /* Default status type, no side effects */
  1940.     gxSpoolingPageStatus        = 9,                            /* Signals page spooled, increments page count in spooling dialog */
  1941.     gxEndStatus                    = 10,                            /* Signals end of spooling */
  1942.     gxPercentageStatus            = 11                            /* Signals QDGX as to the amount of the job which is currently complete */
  1943. };
  1944.  
  1945.  
  1946. /* Structure for gxWriteStatusToDTPWindow message */
  1947.  
  1948. struct gxDisplayRecord {
  1949.     Boolean                         useText;                    /* Use text as opposed to a picture */
  1950.     char                             padByte;
  1951.     Handle                             hPicture;                    /* if !useText, the picture handle */
  1952.     Str255                             theText;                    /* if useText, the text */
  1953. };
  1954. typedef struct gxDisplayRecord            gxDisplayRecord;
  1955.  
  1956. /*-----------------------------------------------*/
  1957. /* paper mapping-related constants and types...  */
  1958. /*-----------------------------------------------*/
  1959.  
  1960.  
  1961. typedef long                             gxTrayMapping;
  1962. enum {
  1963.     gxDefaultTrayMapping        = 0L,
  1964.     gxConfiguredTrayMapping        = 1L
  1965. };
  1966.  
  1967.  
  1968.  
  1969. /* ------------------------------------------------------------------------------
  1970.  
  1971.                 API Functions callable only from within message overrides
  1972.  
  1973. -------------------------------------------------------------------------------- */
  1974. #define GXPRINTINGDISPATCH(segID, selector) {0x203C, 0x0001, 0, 0x223C, (segID & 0x0FFF), selector << 2, 0xABFE}
  1975.  
  1976. /*
  1977.     Message Sending API Routines
  1978. */
  1979. #if TARGET_CPU_68K
  1980. EXTERN_API_C( OSErr )
  1981. GXPrintingDispatch                (long                     selector,
  1982.                                  ...)                                                        SIXWORDINLINE(0x221F, 0x203C, 0x0001, 0x0000, 0xABFE, 0x598F);
  1983.  
  1984. #endif  /* TARGET_CPU_68K */
  1985.  
  1986. /*
  1987.  
  1988.     How to use the GXPRINTINGDISPATCH macro...
  1989.     
  1990.     If your driver or extension is large, you may want to segment it
  1991.     across smaller boundaries than is permitted by the messaging system.
  1992.     Without using the Printing Manager's segmentation manager directly,
  1993.     the smallest segment you can create consists of the code to override
  1994.     a single message.  If you are overriding workhorse messages such as
  1995.     RenderPage, you may want to divide up the work among many functions
  1996.     distributed across several segments.  Here's how...
  1997.     
  1998.     The Printing Manager segment scheme involves the construction of a
  1999.     single 32-bit dispatch selector, which contains all the information
  2000.     necessary for the dispatcher to find a single routine.  It contains the
  2001.     segment's resource ID, and the offset within the segment which contains
  2002.     the start of the routine.  The GXPRINTINGDISPATCH macro will construct the
  2003.     dispatch selector for you, as well as the code to do the dispatch.
  2004.     
  2005.     Usually, it is convenient to start your segment with a long aligned jump table,
  2006.     beginning after the 4 byte header required by the Printing Manager.  The
  2007.     macro assumes this is the case and takes a 1-based routine selector from
  2008.     which it conmstructs the offset.
  2009.     
  2010.     For example, if your code is in resource 'pdvr' (print driver), ID=2
  2011.     at offset=12 (third routine in segment), you would declare your
  2012.     routine as follows:
  2013.     
  2014.     OSErr MyRenderingRoutine (long param1, Ptr param2)
  2015.         = GXPRINTINGDISPATCH(2, 3);
  2016.         
  2017.     Remember, ALL segment dispatches must return OSErr.  If your routine
  2018.     does not generate errors, you must still declare it to return OSErr
  2019.     and have the routine itself return noErr.
  2020.     
  2021.     An alternative way to call across segments is to call the GXPrintingDispatch
  2022.     function directly.  You must construct the 32-bit selector yourself and pass
  2023.     it as the first parameter.  This is usually not preferable since you don't get
  2024.     type-checking unless you declare a prototype as shown above, and your code
  2025.     isn't as easy to read.
  2026.     
  2027.     So given the above prototype, there are two ways to call the function:
  2028.     
  2029.         anErr = MyRenderingRoutine(p1, p2);            // Free type checking!
  2030.         
  2031.     or:
  2032.     
  2033.         #define kMyRenderRoutineSelector 0x0002000C
  2034.         anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2);        // No type-checking!
  2035.     
  2036.     
  2037.     Both have the same effect.
  2038.  
  2039. */
  2040. EXTERN_API_C( gxJob )
  2041. GXGetJob                        (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0001, 0xABFE);
  2042.  
  2043. EXTERN_API_C( short )
  2044. GXGetMessageHandlerResFile        (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0002, 0xABFE);
  2045.  
  2046. EXTERN_API_C( Boolean )
  2047. GXSpoolingAborted                (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0003, 0xABFE);
  2048.  
  2049. EXTERN_API_C( OSErr )
  2050. GXJobIdle                        (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0004, 0xABFE);
  2051.  
  2052. EXTERN_API_C( OSErr )
  2053. GXReportStatus                    (long                     statusID,
  2054.                                  unsigned long             statusIndex)                        FOURWORDINLINE(0x203C, 0x0001, 0x0005, 0xABFE);
  2055.  
  2056. EXTERN_API_C( OSErr )
  2057. GXAlertTheUser                    (gxStatusRecord *        statusRec)                            FOURWORDINLINE(0x203C, 0x0001, 0x0006, 0xABFE);
  2058.  
  2059. EXTERN_API_C( OSErr )
  2060. GXSetupDialogPanel                (gxPanelSetupRecord *    panelRec)                            FOURWORDINLINE(0x203C, 0x0001, 0x0007, 0xABFE);
  2061.  
  2062. EXTERN_API_C( OSErr )
  2063. GXCountTrays                    (gxTrayIndex *            numTrays)                            FOURWORDINLINE(0x203C, 0x0001, 0x0008, 0xABFE);
  2064.  
  2065. EXTERN_API_C( OSErr )
  2066. GXGetTrayName                    (gxTrayIndex             trayNumber,
  2067.                                  Str31                     trayName)                            FOURWORDINLINE(0x203C, 0x0001, 0x0009, 0xABFE);
  2068.  
  2069. EXTERN_API_C( OSErr )
  2070. GXSetTrayPaperType                (gxTrayIndex             whichTray,
  2071.                                  gxPaperType             aPapertype)                            FOURWORDINLINE(0x203C, 0x0001, 0x000A, 0xABFE);
  2072.  
  2073. EXTERN_API_C( OSErr )
  2074. GXGetTrayPaperType                (gxTrayIndex             whichTray,
  2075.                                  gxPaperType             aPapertype)                            FOURWORDINLINE(0x203C, 0x0001, 0x000B, 0xABFE);
  2076.  
  2077. EXTERN_API_C( OSErr )
  2078. GXGetTrayMapping                (gxTrayMapping *        trayMapping)                        FOURWORDINLINE(0x203C, 0x0001, 0x000C, 0xABFE);
  2079.  
  2080. EXTERN_API_C( void )
  2081. GXCleanupStartJob                (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x000D, 0xABFE);
  2082.  
  2083. EXTERN_API_C( void )
  2084. GXCleanupStartPage                (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x000E, 0xABFE);
  2085.  
  2086. EXTERN_API_C( void )
  2087. GXCleanupOpenConnection            (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x000F, 0xABFE);
  2088.  
  2089. EXTERN_API_C( void )
  2090. GXCleanupStartSendPage            (void)                                                        FOURWORDINLINE(0x203C, 0x0001, 0x0010, 0xABFE);
  2091.  
  2092.  
  2093. /* ------------------------------------------------------------------------------
  2094.  
  2095.                     Constants and types for Universal Printing Messages
  2096.  
  2097. -------------------------------------------------------------------------------- */
  2098.  
  2099. /* Options for gxCreateSpoolFile message */
  2100. enum {
  2101.     gxNoCreateOptions            = 0x00000000,                    /* Just create the file */
  2102.     gxInhibitAlias                = 0x00000001,                    /* Do not create an alias in the PMD folder */
  2103.     gxInhibitUniqueName            = 0x00000002,                    /* Do not append to the filename to make it unique */
  2104.     gxResolveBitmapAlias        = 0x00000004                    /* Resolve bitmap aliases and duplicate data in file */
  2105. };
  2106.  
  2107.  
  2108. /* Options for gxCloseSpoolFile message */
  2109. enum {
  2110.     gxNoCloseOptions            = 0x00000000,                    /* Just close the file */
  2111.     gxDeleteOnClose                = 0x00000001,                    /* Delete the file rather than closing it */
  2112.     gxUpdateJobData                = 0x00000002,                    /* Write current job information into file prior to closing */
  2113.     gxMakeRemoteFile            = 0x00000004                    /* Mark job as a remote file */
  2114. };
  2115.  
  2116.  
  2117. /* Options for gxCreateImageFile message */
  2118. enum {
  2119.     gxNoImageFile                = 0x00000000,                    /* Don't create image file */
  2120.     gxMakeImageFile                = 0x00000001,                    /* Create an image file */
  2121.     gxEachPlane                    = 0x00000002,                    /* Only save up planes before rewinding */
  2122.     gxEachPage                    = 0x00000004,                    /* Save up entire pages before rewinding */
  2123.     gxEntireFile                = gxEachPlane + gxEachPage        /* Save up the entire file before rewinding */
  2124. };
  2125.  
  2126.  
  2127. /* Options for gxBufferData message */
  2128. enum {
  2129.     gxNoBufferOptions            = 0x00000000,
  2130.     gxMakeBufferHex                = 0x00000001,
  2131.     gxDontSplitBuffer            = 0x00000002
  2132. };
  2133.  
  2134.  
  2135. /* Structure for gxDumpBuffer and gxFreeBuffer messages */
  2136.  
  2137. struct gxPrintingBuffer {
  2138.     long                             size;                        /* Size of buffer in bytes */
  2139.     long                             userData;                    /* Client assigned id for the buffer */
  2140.     char                             data[1];                    /* Array of size bytes */
  2141. };
  2142. typedef struct gxPrintingBuffer            gxPrintingBuffer;
  2143.  
  2144. /* Structure for gxRenderPage message */
  2145.  
  2146. struct gxPageInfoRecord {
  2147.     long                             docPageNum;                    /* Number of page being printed */
  2148.     long                             copyNum;                    /* Copy number being printed */
  2149.     Boolean                         formatChanged;                /* True if format changed from last page */
  2150.     Boolean                         pageChanged;                /* True if page contents changed from last page */
  2151.     long                             internalUse;                /* Private */
  2152. };
  2153. typedef struct gxPageInfoRecord            gxPageInfoRecord;
  2154. /* ------------------------------------------------------------------------------
  2155.     
  2156.                                     Universal Printing Messages
  2157.     
  2158.     -------------------------------------------------------------------------------- */
  2159. typedef CALLBACK_API_C( OSErr , GXJobIdleProcPtr )(void );
  2160. typedef STACK_UPP_TYPE(GXJobIdleProcPtr)                         GXJobIdleUPP;
  2161. #if OPAQUE_UPP_TYPES
  2162.     EXTERN_API(GXJobIdleUPP)
  2163.     NewGXJobIdleUPP                   (GXJobIdleProcPtr        userRoutine);
  2164.  
  2165.     EXTERN_API(void)
  2166.     DisposeGXJobIdleUPP               (GXJobIdleUPP            userUPP);
  2167.  
  2168.     EXTERN_API(OSErr)
  2169.     InvokeGXJobIdleUPP               (GXJobIdleUPP            userUPP);
  2170.  
  2171. #else
  2172.     enum { uppGXJobIdleProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2173.     #define NewGXJobIdleUPP(userRoutine)                             (GXJobIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobIdleProcInfo, GetCurrentArchitecture())
  2174.     #define DisposeGXJobIdleUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2175.     #define InvokeGXJobIdleUPP(userUPP)                             (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXJobIdleProcInfo)
  2176. #endif
  2177. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2178. #define NewGXJobIdleProc(userRoutine)                             NewGXJobIdleUPP(userRoutine)
  2179. #define CallGXJobIdleProc(userRoutine)                            InvokeGXJobIdleUPP(userRoutine)
  2180. #define Send_GXJobIdle() MacSendMessage(0x00000002)
  2181. #define Forward_GXJobIdle() ForwardThisMessage((void *) (0))
  2182.  
  2183. typedef CALLBACK_API_C( OSErr , GXJobStatusProcPtr )(gxStatusRecord *pStatus);
  2184. typedef STACK_UPP_TYPE(GXJobStatusProcPtr)                         GXJobStatusUPP;
  2185. #if OPAQUE_UPP_TYPES
  2186.     EXTERN_API(GXJobStatusUPP)
  2187.     NewGXJobStatusUPP               (GXJobStatusProcPtr        userRoutine);
  2188.  
  2189.     EXTERN_API(void)
  2190.     DisposeGXJobStatusUPP           (GXJobStatusUPP            userUPP);
  2191.  
  2192.     EXTERN_API(OSErr)
  2193.     InvokeGXJobStatusUPP           (gxStatusRecord *        pStatus,
  2194.                                     GXJobStatusUPP            userUPP);
  2195.  
  2196. #else
  2197.     enum { uppGXJobStatusProcInfo = 0x000000E1 };                     /* 2_bytes Func(4_bytes) */
  2198.     #define NewGXJobStatusUPP(userRoutine)                             (GXJobStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobStatusProcInfo, GetCurrentArchitecture())
  2199.     #define DisposeGXJobStatusUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2200.     #define InvokeGXJobStatusUPP(pStatus, userUPP)                     (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobStatusProcInfo, (pStatus))
  2201. #endif
  2202. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2203. #define NewGXJobStatusProc(userRoutine)                         NewGXJobStatusUPP(userRoutine)
  2204. #define CallGXJobStatusProc(userRoutine, pStatus)                InvokeGXJobStatusUPP(pStatus, userRoutine)
  2205. #define Send_GXJobStatus(pStatus) \
  2206.           MacSendMessage(0x00000003, pStatus)
  2207.  
  2208. #define Forward_GXJobStatus(pStatus) \
  2209.           ForwardThisMessage((void *) (pStatus))
  2210.  
  2211. typedef CALLBACK_API_C( OSErr , GXPrintingEventProcPtr )(EventRecord *evtRecord, Boolean filterEvent);
  2212. typedef STACK_UPP_TYPE(GXPrintingEventProcPtr)                     GXPrintingEventUPP;
  2213. #if OPAQUE_UPP_TYPES
  2214.     EXTERN_API(GXPrintingEventUPP)
  2215.     NewGXPrintingEventUPP           (GXPrintingEventProcPtr    userRoutine);
  2216.  
  2217.     EXTERN_API(void)
  2218.     DisposeGXPrintingEventUPP       (GXPrintingEventUPP        userUPP);
  2219.  
  2220.     EXTERN_API(OSErr)
  2221.     InvokeGXPrintingEventUPP       (EventRecord *            evtRecord,
  2222.                                     Boolean                    filterEvent,
  2223.                                     GXPrintingEventUPP        userUPP);
  2224.  
  2225. #else
  2226.     enum { uppGXPrintingEventProcInfo = 0x000001E1 };                 /* 2_bytes Func(4_bytes, 1_byte) */
  2227.     #define NewGXPrintingEventUPP(userRoutine)                         (GXPrintingEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingEventProcInfo, GetCurrentArchitecture())
  2228.     #define DisposeGXPrintingEventUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2229.     #define InvokeGXPrintingEventUPP(evtRecord, filterEvent, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPrintingEventProcInfo, (evtRecord), (filterEvent))
  2230. #endif
  2231. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2232. #define NewGXPrintingEventProc(userRoutine)                     NewGXPrintingEventUPP(userRoutine)
  2233. #define CallGXPrintingEventProc(userRoutine, evtRecord, filterEvent) InvokeGXPrintingEventUPP(evtRecord, filterEvent, userRoutine)
  2234. #define Send_GXPrintingEvent(evtRecord, filterEvent) \
  2235.           MacSendMessage(0x00000004, evtRecord, filterEvent)
  2236.  
  2237. #define Forward_GXPrintingEvent(evtRecord, filterEvent) \
  2238.           ForwardThisMessage((void *) (evtRecord), (void *) (filterEvent))
  2239.  
  2240. typedef CALLBACK_API_C( OSErr , GXJobDefaultFormatDialogProcPtr )(gxDialogResult *dlgResult);
  2241. typedef STACK_UPP_TYPE(GXJobDefaultFormatDialogProcPtr)         GXJobDefaultFormatDialogUPP;
  2242. #if OPAQUE_UPP_TYPES
  2243.     EXTERN_API(GXJobDefaultFormatDialogUPP)
  2244.     NewGXJobDefaultFormatDialogUPP    (GXJobDefaultFormatDialogProcPtr userRoutine);
  2245.  
  2246.     EXTERN_API(void)
  2247.     DisposeGXJobDefaultFormatDialogUPP    (GXJobDefaultFormatDialogUPP userUPP);
  2248.  
  2249.     EXTERN_API(OSErr)
  2250.     InvokeGXJobDefaultFormatDialogUPP    (gxDialogResult *    dlgResult,
  2251.                                     GXJobDefaultFormatDialogUPP userUPP);
  2252.  
  2253. #else
  2254.     enum { uppGXJobDefaultFormatDialogProcInfo = 0x000000E1 };         /* 2_bytes Func(4_bytes) */
  2255.     #define NewGXJobDefaultFormatDialogUPP(userRoutine)             (GXJobDefaultFormatDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobDefaultFormatDialogProcInfo, GetCurrentArchitecture())
  2256.     #define DisposeGXJobDefaultFormatDialogUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  2257.     #define InvokeGXJobDefaultFormatDialogUPP(dlgResult, userUPP)     (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobDefaultFormatDialogProcInfo, (dlgResult))
  2258. #endif
  2259. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2260. #define NewGXJobDefaultFormatDialogProc(userRoutine)             NewGXJobDefaultFormatDialogUPP(userRoutine)
  2261. #define CallGXJobDefaultFormatDialogProc(userRoutine, dlgResult) InvokeGXJobDefaultFormatDialogUPP(dlgResult, userRoutine)
  2262. #define Send_GXJobDefaultFormatDialog(dlgResult) \
  2263.           MacSendMessage(0x00000005, dlgResult)
  2264.  
  2265. #define Forward_GXJobDefaultFormatDialog(dlgResult) \
  2266.           ForwardThisMessage((void *) (dlgResult))
  2267.  
  2268. typedef CALLBACK_API_C( OSErr , GXFormatDialogProcPtr )(gxFormat theFormat, StringPtr title, gxDialogResult *dlgResult);
  2269. typedef STACK_UPP_TYPE(GXFormatDialogProcPtr)                     GXFormatDialogUPP;
  2270. #if OPAQUE_UPP_TYPES
  2271.     EXTERN_API(GXFormatDialogUPP)
  2272.     NewGXFormatDialogUPP           (GXFormatDialogProcPtr    userRoutine);
  2273.  
  2274.     EXTERN_API(void)
  2275.     DisposeGXFormatDialogUPP       (GXFormatDialogUPP        userUPP);
  2276.  
  2277.     EXTERN_API(OSErr)
  2278.     InvokeGXFormatDialogUPP           (gxFormat                theFormat,
  2279.                                     StringPtr                title,
  2280.                                     gxDialogResult *        dlgResult,
  2281.                                     GXFormatDialogUPP        userUPP);
  2282.  
  2283. #else
  2284.     enum { uppGXFormatDialogProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2285.     #define NewGXFormatDialogUPP(userRoutine)                         (GXFormatDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatDialogProcInfo, GetCurrentArchitecture())
  2286.     #define DisposeGXFormatDialogUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2287.     #define InvokeGXFormatDialogUPP(theFormat, title, dlgResult, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXFormatDialogProcInfo, (theFormat), (title), (dlgResult))
  2288. #endif
  2289. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2290. #define NewGXFormatDialogProc(userRoutine)                         NewGXFormatDialogUPP(userRoutine)
  2291. #define CallGXFormatDialogProc(userRoutine, theFormat, title, dlgResult) InvokeGXFormatDialogUPP(theFormat, title, dlgResult, userRoutine)
  2292. #define Send_GXFormatDialog(theFormat, title, dlgResult) \
  2293.           MacSendMessage(0x00000006, theFormat, title, dlgResult)
  2294.  
  2295. #define Forward_GXFormatDialog(theFormat, title, dlgResult) \
  2296.           ForwardThisMessage((void *) (theFormat),(void *) (title),(void *) (dlgResult))
  2297.  
  2298. typedef CALLBACK_API_C( OSErr , GXJobPrintDialogProcPtr )(gxDialogResult *dlgResult);
  2299. typedef STACK_UPP_TYPE(GXJobPrintDialogProcPtr)                 GXJobPrintDialogUPP;
  2300. #if OPAQUE_UPP_TYPES
  2301.     EXTERN_API(GXJobPrintDialogUPP)
  2302.     NewGXJobPrintDialogUPP           (GXJobPrintDialogProcPtr    userRoutine);
  2303.  
  2304.     EXTERN_API(void)
  2305.     DisposeGXJobPrintDialogUPP       (GXJobPrintDialogUPP        userUPP);
  2306.  
  2307.     EXTERN_API(OSErr)
  2308.     InvokeGXJobPrintDialogUPP       (gxDialogResult *        dlgResult,
  2309.                                     GXJobPrintDialogUPP        userUPP);
  2310.  
  2311. #else
  2312.     enum { uppGXJobPrintDialogProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2313.     #define NewGXJobPrintDialogUPP(userRoutine)                     (GXJobPrintDialogUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobPrintDialogProcInfo, GetCurrentArchitecture())
  2314.     #define DisposeGXJobPrintDialogUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2315.     #define InvokeGXJobPrintDialogUPP(dlgResult, userUPP)             (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXJobPrintDialogProcInfo, (dlgResult))
  2316. #endif
  2317. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2318. #define NewGXJobPrintDialogProc(userRoutine)                     NewGXJobPrintDialogUPP(userRoutine)
  2319. #define CallGXJobPrintDialogProc(userRoutine, dlgResult)        InvokeGXJobPrintDialogUPP(dlgResult, userRoutine)
  2320. #define Send_GXJobPrintDialog(dlgResult) \
  2321.           MacSendMessage(0x00000007, dlgResult)
  2322.  
  2323. #define Forward_GXJobPrintDialog(dlgResult) \
  2324.           ForwardThisMessage((void *) (dlgResult))
  2325.  
  2326. typedef CALLBACK_API_C( OSErr , GXFilterPanelEventProcPtr )(gxPanelInfoRecord *pHitInfo, Boolean *returnImmed);
  2327. typedef STACK_UPP_TYPE(GXFilterPanelEventProcPtr)                 GXFilterPanelEventUPP;
  2328. #if OPAQUE_UPP_TYPES
  2329.     EXTERN_API(GXFilterPanelEventUPP)
  2330.     NewGXFilterPanelEventUPP       (GXFilterPanelEventProcPtr userRoutine);
  2331.  
  2332.     EXTERN_API(void)
  2333.     DisposeGXFilterPanelEventUPP    (GXFilterPanelEventUPP    userUPP);
  2334.  
  2335.     EXTERN_API(OSErr)
  2336.     InvokeGXFilterPanelEventUPP       (gxPanelInfoRecord *        pHitInfo,
  2337.                                     Boolean *                returnImmed,
  2338.                                     GXFilterPanelEventUPP    userUPP);
  2339.  
  2340. #else
  2341.     enum { uppGXFilterPanelEventProcInfo = 0x000003E1 };             /* 2_bytes Func(4_bytes, 4_bytes) */
  2342.     #define NewGXFilterPanelEventUPP(userRoutine)                     (GXFilterPanelEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFilterPanelEventProcInfo, GetCurrentArchitecture())
  2343.     #define DisposeGXFilterPanelEventUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2344.     #define InvokeGXFilterPanelEventUPP(pHitInfo, returnImmed, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXFilterPanelEventProcInfo, (pHitInfo), (returnImmed))
  2345. #endif
  2346. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2347. #define NewGXFilterPanelEventProc(userRoutine)                     NewGXFilterPanelEventUPP(userRoutine)
  2348. #define CallGXFilterPanelEventProc(userRoutine, pHitInfo, returnImmed) InvokeGXFilterPanelEventUPP(pHitInfo, returnImmed, userRoutine)
  2349. #define Send_GXFilterPanelEvent(pHitInfo, returnImmed) \
  2350.           MacSendMessage(0x00000008, pHitInfo, returnImmed)
  2351.  
  2352. typedef CALLBACK_API_C( OSErr , GXHandlePanelEventProcPtr )(gxPanelInfoRecord *pHitInfo, gxPanelResult *panelResponse);
  2353. typedef STACK_UPP_TYPE(GXHandlePanelEventProcPtr)                 GXHandlePanelEventUPP;
  2354. #if OPAQUE_UPP_TYPES
  2355.     EXTERN_API(GXHandlePanelEventUPP)
  2356.     NewGXHandlePanelEventUPP       (GXHandlePanelEventProcPtr userRoutine);
  2357.  
  2358.     EXTERN_API(void)
  2359.     DisposeGXHandlePanelEventUPP    (GXHandlePanelEventUPP    userUPP);
  2360.  
  2361.     EXTERN_API(OSErr)
  2362.     InvokeGXHandlePanelEventUPP       (gxPanelInfoRecord *        pHitInfo,
  2363.                                     gxPanelResult *            panelResponse,
  2364.                                     GXHandlePanelEventUPP    userUPP);
  2365.  
  2366. #else
  2367.     enum { uppGXHandlePanelEventProcInfo = 0x000003E1 };             /* 2_bytes Func(4_bytes, 4_bytes) */
  2368.     #define NewGXHandlePanelEventUPP(userRoutine)                     (GXHandlePanelEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandlePanelEventProcInfo, GetCurrentArchitecture())
  2369.     #define DisposeGXHandlePanelEventUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2370.     #define InvokeGXHandlePanelEventUPP(pHitInfo, panelResponse, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXHandlePanelEventProcInfo, (pHitInfo), (panelResponse))
  2371. #endif
  2372. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2373. #define NewGXHandlePanelEventProc(userRoutine)                     NewGXHandlePanelEventUPP(userRoutine)
  2374. #define CallGXHandlePanelEventProc(userRoutine, pHitInfo, panelResponse) InvokeGXHandlePanelEventUPP(pHitInfo, panelResponse, userRoutine)
  2375. #define Send_GXHandlePanelEvent(pHitInfo, panelResponse) \
  2376.           MacSendMessage(0x00000009, pHitInfo, panelResponse)
  2377.  
  2378. typedef CALLBACK_API_C( OSErr , GXParsePageRangeProcPtr )(StringPtr fromString, StringPtr toString, gxParsePageRangeResult *result);
  2379. typedef STACK_UPP_TYPE(GXParsePageRangeProcPtr)                 GXParsePageRangeUPP;
  2380. #if OPAQUE_UPP_TYPES
  2381.     EXTERN_API(GXParsePageRangeUPP)
  2382.     NewGXParsePageRangeUPP           (GXParsePageRangeProcPtr    userRoutine);
  2383.  
  2384.     EXTERN_API(void)
  2385.     DisposeGXParsePageRangeUPP       (GXParsePageRangeUPP        userUPP);
  2386.  
  2387.     EXTERN_API(OSErr)
  2388.     InvokeGXParsePageRangeUPP       (StringPtr                fromString,
  2389.                                     StringPtr                toString,
  2390.                                     gxParsePageRangeResult * result,
  2391.                                     GXParsePageRangeUPP        userUPP);
  2392.  
  2393. #else
  2394.     enum { uppGXParsePageRangeProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2395.     #define NewGXParsePageRangeUPP(userRoutine)                     (GXParsePageRangeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXParsePageRangeProcInfo, GetCurrentArchitecture())
  2396.     #define DisposeGXParsePageRangeUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2397.     #define InvokeGXParsePageRangeUPP(fromString, toString, result, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXParsePageRangeProcInfo, (fromString), (toString), (result))
  2398. #endif
  2399. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2400. #define NewGXParsePageRangeProc(userRoutine)                     NewGXParsePageRangeUPP(userRoutine)
  2401. #define CallGXParsePageRangeProc(userRoutine, fromString, toString, result) InvokeGXParsePageRangeUPP(fromString, toString, result, userRoutine)
  2402. #define Send_GXParsePageRange(fromString, toString, result) \
  2403.           MacSendMessage(0x0000000A, fromString, toString, result)
  2404.  
  2405. #define Forward_GXParsePageRange(fromString, toString, result) \
  2406.           ForwardThisMessage((void *) (fromString), (void *) (toString), (void *) (result))
  2407.  
  2408. typedef CALLBACK_API_C( OSErr , GXDefaultJobProcPtr )(void );
  2409. typedef STACK_UPP_TYPE(GXDefaultJobProcPtr)                     GXDefaultJobUPP;
  2410. #if OPAQUE_UPP_TYPES
  2411.     EXTERN_API(GXDefaultJobUPP)
  2412.     NewGXDefaultJobUPP               (GXDefaultJobProcPtr        userRoutine);
  2413.  
  2414.     EXTERN_API(void)
  2415.     DisposeGXDefaultJobUPP           (GXDefaultJobUPP            userUPP);
  2416.  
  2417.     EXTERN_API(OSErr)
  2418.     InvokeGXDefaultJobUPP           (GXDefaultJobUPP            userUPP);
  2419.  
  2420. #else
  2421.     enum { uppGXDefaultJobProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2422.     #define NewGXDefaultJobUPP(userRoutine)                         (GXDefaultJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultJobProcInfo, GetCurrentArchitecture())
  2423.     #define DisposeGXDefaultJobUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2424.     #define InvokeGXDefaultJobUPP(userUPP)                             (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXDefaultJobProcInfo)
  2425. #endif
  2426. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2427. #define NewGXDefaultJobProc(userRoutine)                         NewGXDefaultJobUPP(userRoutine)
  2428. #define CallGXDefaultJobProc(userRoutine)                        InvokeGXDefaultJobUPP(userRoutine)
  2429. #define Send_GXDefaultJob() MacSendMessage(0x0000000B)
  2430. #define Forward_GXDefaultJob() ForwardThisMessage((void *) (0))
  2431.  
  2432. typedef CALLBACK_API_C( OSErr , GXDefaultFormatProcPtr )(gxFormat theFormat);
  2433. typedef STACK_UPP_TYPE(GXDefaultFormatProcPtr)                     GXDefaultFormatUPP;
  2434. #if OPAQUE_UPP_TYPES
  2435.     EXTERN_API(GXDefaultFormatUPP)
  2436.     NewGXDefaultFormatUPP           (GXDefaultFormatProcPtr    userRoutine);
  2437.  
  2438.     EXTERN_API(void)
  2439.     DisposeGXDefaultFormatUPP       (GXDefaultFormatUPP        userUPP);
  2440.  
  2441.     EXTERN_API(OSErr)
  2442.     InvokeGXDefaultFormatUPP       (gxFormat                theFormat,
  2443.                                     GXDefaultFormatUPP        userUPP);
  2444.  
  2445. #else
  2446.     enum { uppGXDefaultFormatProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2447.     #define NewGXDefaultFormatUPP(userRoutine)                         (GXDefaultFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultFormatProcInfo, GetCurrentArchitecture())
  2448.     #define DisposeGXDefaultFormatUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2449.     #define InvokeGXDefaultFormatUPP(theFormat, userUPP)             (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultFormatProcInfo, (theFormat))
  2450. #endif
  2451. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2452. #define NewGXDefaultFormatProc(userRoutine)                     NewGXDefaultFormatUPP(userRoutine)
  2453. #define CallGXDefaultFormatProc(userRoutine, theFormat)            InvokeGXDefaultFormatUPP(theFormat, userRoutine)
  2454. #define Send_GXDefaultFormat(theFormat) \
  2455.           MacSendMessage(0x0000000C, theFormat)
  2456.  
  2457. #define Forward_GXDefaultFormat(theFormat) \
  2458.           ForwardThisMessage((void *) (theFormat))
  2459.  
  2460. typedef CALLBACK_API_C( OSErr , GXDefaultPaperTypeProcPtr )(gxPaperType thePaperType);
  2461. typedef STACK_UPP_TYPE(GXDefaultPaperTypeProcPtr)                 GXDefaultPaperTypeUPP;
  2462. #if OPAQUE_UPP_TYPES
  2463.     EXTERN_API(GXDefaultPaperTypeUPP)
  2464.     NewGXDefaultPaperTypeUPP       (GXDefaultPaperTypeProcPtr userRoutine);
  2465.  
  2466.     EXTERN_API(void)
  2467.     DisposeGXDefaultPaperTypeUPP    (GXDefaultPaperTypeUPP    userUPP);
  2468.  
  2469.     EXTERN_API(OSErr)
  2470.     InvokeGXDefaultPaperTypeUPP       (gxPaperType                thePaperType,
  2471.                                     GXDefaultPaperTypeUPP    userUPP);
  2472.  
  2473. #else
  2474.     enum { uppGXDefaultPaperTypeProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  2475.     #define NewGXDefaultPaperTypeUPP(userRoutine)                     (GXDefaultPaperTypeUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPaperTypeProcInfo, GetCurrentArchitecture())
  2476.     #define DisposeGXDefaultPaperTypeUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2477.     #define InvokeGXDefaultPaperTypeUPP(thePaperType, userUPP)         (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultPaperTypeProcInfo, (thePaperType))
  2478. #endif
  2479. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2480. #define NewGXDefaultPaperTypeProc(userRoutine)                     NewGXDefaultPaperTypeUPP(userRoutine)
  2481. #define CallGXDefaultPaperTypeProc(userRoutine, thePaperType)    InvokeGXDefaultPaperTypeUPP(thePaperType, userRoutine)
  2482. #define Send_GXDefaultPaperType(thePaperType) \
  2483.           MacSendMessage(0x0000000D, thePaperType)
  2484.  
  2485. #define Forward_GXDefaultPaperType(thePaperType) \
  2486.           ForwardThisMessage((void *) thePaperType)
  2487.  
  2488. typedef CALLBACK_API_C( OSErr , GXDefaultPrinterProcPtr )(gxPrinter thePrinter);
  2489. typedef STACK_UPP_TYPE(GXDefaultPrinterProcPtr)                 GXDefaultPrinterUPP;
  2490. #if OPAQUE_UPP_TYPES
  2491.     EXTERN_API(GXDefaultPrinterUPP)
  2492.     NewGXDefaultPrinterUPP           (GXDefaultPrinterProcPtr    userRoutine);
  2493.  
  2494.     EXTERN_API(void)
  2495.     DisposeGXDefaultPrinterUPP       (GXDefaultPrinterUPP        userUPP);
  2496.  
  2497.     EXTERN_API(OSErr)
  2498.     InvokeGXDefaultPrinterUPP       (gxPrinter                thePrinter,
  2499.                                     GXDefaultPrinterUPP        userUPP);
  2500.  
  2501. #else
  2502.     enum { uppGXDefaultPrinterProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2503.     #define NewGXDefaultPrinterUPP(userRoutine)                     (GXDefaultPrinterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPrinterProcInfo, GetCurrentArchitecture())
  2504.     #define DisposeGXDefaultPrinterUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2505.     #define InvokeGXDefaultPrinterUPP(thePrinter, userUPP)             (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultPrinterProcInfo, (thePrinter))
  2506. #endif
  2507. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2508. #define NewGXDefaultPrinterProc(userRoutine)                     NewGXDefaultPrinterUPP(userRoutine)
  2509. #define CallGXDefaultPrinterProc(userRoutine, thePrinter)        InvokeGXDefaultPrinterUPP(thePrinter, userRoutine)
  2510. #define Send_GXDefaultPrinter(thePrinter) \
  2511.           MacSendMessage(0x0000000E, thePrinter)
  2512.  
  2513. #define Forward_GXDefaultPrinter(thePrinter) \
  2514.           ForwardThisMessage((void *) thePrinter)
  2515.  
  2516. typedef CALLBACK_API_C( OSErr , GXCreateSpoolFileProcPtr )(FSSpecPtr pFileSpec, long createOptions, gxSpoolFile *theSpoolFile);
  2517. typedef STACK_UPP_TYPE(GXCreateSpoolFileProcPtr)                 GXCreateSpoolFileUPP;
  2518. #if OPAQUE_UPP_TYPES
  2519.     EXTERN_API(GXCreateSpoolFileUPP)
  2520.     NewGXCreateSpoolFileUPP           (GXCreateSpoolFileProcPtr userRoutine);
  2521.  
  2522.     EXTERN_API(void)
  2523.     DisposeGXCreateSpoolFileUPP       (GXCreateSpoolFileUPP    userUPP);
  2524.  
  2525.     EXTERN_API(OSErr)
  2526.     InvokeGXCreateSpoolFileUPP       (FSSpecPtr                pFileSpec,
  2527.                                     long                    createOptions,
  2528.                                     gxSpoolFile *            theSpoolFile,
  2529.                                     GXCreateSpoolFileUPP    userUPP);
  2530.  
  2531. #else
  2532.     enum { uppGXCreateSpoolFileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2533.     #define NewGXCreateSpoolFileUPP(userRoutine)                     (GXCreateSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateSpoolFileProcInfo, GetCurrentArchitecture())
  2534.     #define DisposeGXCreateSpoolFileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2535.     #define InvokeGXCreateSpoolFileUPP(pFileSpec, createOptions, theSpoolFile, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXCreateSpoolFileProcInfo, (pFileSpec), (createOptions), (theSpoolFile))
  2536. #endif
  2537. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2538. #define NewGXCreateSpoolFileProc(userRoutine)                     NewGXCreateSpoolFileUPP(userRoutine)
  2539. #define CallGXCreateSpoolFileProc(userRoutine, pFileSpec, createOptions, theSpoolFile) InvokeGXCreateSpoolFileUPP(pFileSpec, createOptions, theSpoolFile, userRoutine)
  2540. #define Send_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
  2541.           MacSendMessage(0x0000000F, pFileSpec, createOptions, \
  2542.                             theSpoolFile)
  2543.  
  2544. #define Forward_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
  2545.           ForwardThisMessage((void *) pFileSpec, (void *) (createOptions), (void *) theSpoolFile)
  2546.  
  2547. typedef CALLBACK_API_C( OSErr , GXSpoolPageProcPtr )(gxSpoolFile theSpoolFile, gxFormat theFormat, gxShape thePage);
  2548. typedef STACK_UPP_TYPE(GXSpoolPageProcPtr)                         GXSpoolPageUPP;
  2549. #if OPAQUE_UPP_TYPES
  2550.     EXTERN_API(GXSpoolPageUPP)
  2551.     NewGXSpoolPageUPP               (GXSpoolPageProcPtr        userRoutine);
  2552.  
  2553.     EXTERN_API(void)
  2554.     DisposeGXSpoolPageUPP           (GXSpoolPageUPP            userUPP);
  2555.  
  2556.     EXTERN_API(OSErr)
  2557.     InvokeGXSpoolPageUPP           (gxSpoolFile                theSpoolFile,
  2558.                                     gxFormat                theFormat,
  2559.                                     gxShape                    thePage,
  2560.                                     GXSpoolPageUPP            userUPP);
  2561.  
  2562. #else
  2563.     enum { uppGXSpoolPageProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2564.     #define NewGXSpoolPageUPP(userRoutine)                             (GXSpoolPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolPageProcInfo, GetCurrentArchitecture())
  2565.     #define DisposeGXSpoolPageUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2566.     #define InvokeGXSpoolPageUPP(theSpoolFile, theFormat, thePage, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSpoolPageProcInfo, (theSpoolFile), (theFormat), (thePage))
  2567. #endif
  2568. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2569. #define NewGXSpoolPageProc(userRoutine)                         NewGXSpoolPageUPP(userRoutine)
  2570. #define CallGXSpoolPageProc(userRoutine, theSpoolFile, theFormat, thePage) InvokeGXSpoolPageUPP(theSpoolFile, theFormat, thePage, userRoutine)
  2571. #define Send_GXSpoolPage(theSpoolFile, theFormat, thePage) \
  2572.           MacSendMessage(0x00000010, theSpoolFile, theFormat, thePage)
  2573.  
  2574. #define Forward_GXSpoolPage(theSpoolFile, theFormat, thePage) \
  2575.           ForwardThisMessage((void *) theSpoolFile, (void *) theFormat, (void *) thePage)
  2576.  
  2577. typedef CALLBACK_API_C( OSErr , GXSpoolDataProcPtr )(gxSpoolFile theSpoolFile, Ptr data, long *length);
  2578. typedef STACK_UPP_TYPE(GXSpoolDataProcPtr)                         GXSpoolDataUPP;
  2579. #if OPAQUE_UPP_TYPES
  2580.     EXTERN_API(GXSpoolDataUPP)
  2581.     NewGXSpoolDataUPP               (GXSpoolDataProcPtr        userRoutine);
  2582.  
  2583.     EXTERN_API(void)
  2584.     DisposeGXSpoolDataUPP           (GXSpoolDataUPP            userUPP);
  2585.  
  2586.     EXTERN_API(OSErr)
  2587.     InvokeGXSpoolDataUPP           (gxSpoolFile                theSpoolFile,
  2588.                                     Ptr                        data,
  2589.                                     long *                    length,
  2590.                                     GXSpoolDataUPP            userUPP);
  2591.  
  2592. #else
  2593.     enum { uppGXSpoolDataProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2594.     #define NewGXSpoolDataUPP(userRoutine)                             (GXSpoolDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolDataProcInfo, GetCurrentArchitecture())
  2595.     #define DisposeGXSpoolDataUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2596.     #define InvokeGXSpoolDataUPP(theSpoolFile, data, length, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSpoolDataProcInfo, (theSpoolFile), (data), (length))
  2597. #endif
  2598. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2599. #define NewGXSpoolDataProc(userRoutine)                         NewGXSpoolDataUPP(userRoutine)
  2600. #define CallGXSpoolDataProc(userRoutine, theSpoolFile, data, length) InvokeGXSpoolDataUPP(theSpoolFile, data, length, userRoutine)
  2601. #define Send_GXSpoolData(theSpoolFile, data, length) \
  2602.           MacSendMessage(0x00000011, theSpoolFile, data, length)
  2603.  
  2604. #define Forward_GXSpoolData(theSpoolFile, data, length) \
  2605.           ForwardThisMessage((void *) theSpoolFile, (void *) data, (void *) length)
  2606.  
  2607. typedef CALLBACK_API_C( OSErr , GXSpoolResourceProcPtr )(gxSpoolFile theSpoolFile, Handle theResource, ResType theType, long id);
  2608. typedef STACK_UPP_TYPE(GXSpoolResourceProcPtr)                     GXSpoolResourceUPP;
  2609. #if OPAQUE_UPP_TYPES
  2610.     EXTERN_API(GXSpoolResourceUPP)
  2611.     NewGXSpoolResourceUPP           (GXSpoolResourceProcPtr    userRoutine);
  2612.  
  2613.     EXTERN_API(void)
  2614.     DisposeGXSpoolResourceUPP       (GXSpoolResourceUPP        userUPP);
  2615.  
  2616.     EXTERN_API(OSErr)
  2617.     InvokeGXSpoolResourceUPP       (gxSpoolFile                theSpoolFile,
  2618.                                     Handle                    theResource,
  2619.                                     ResType                    theType,
  2620.                                     long                    id,
  2621.                                     GXSpoolResourceUPP        userUPP);
  2622.  
  2623. #else
  2624.     enum { uppGXSpoolResourceProcInfo = 0x00003FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2625.     #define NewGXSpoolResourceUPP(userRoutine)                         (GXSpoolResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolResourceProcInfo, GetCurrentArchitecture())
  2626.     #define DisposeGXSpoolResourceUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2627.     #define InvokeGXSpoolResourceUPP(theSpoolFile, theResource, theType, id, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXSpoolResourceProcInfo, (theSpoolFile), (theResource), (theType), (id))
  2628. #endif
  2629. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2630. #define NewGXSpoolResourceProc(userRoutine)                     NewGXSpoolResourceUPP(userRoutine)
  2631. #define CallGXSpoolResourceProc(userRoutine, theSpoolFile, theResource, theType, id) InvokeGXSpoolResourceUPP(theSpoolFile, theResource, theType, id, userRoutine)
  2632. #define Send_GXSpoolResource(theSpoolFile, theResource, theType, id) \
  2633.           MacSendMessage(0x00000012, theSpoolFile, theResource, \
  2634.                             theType, id)
  2635.  
  2636. #define Forward_GXSpoolResource(theSpoolFile, theResource, theType, id) \
  2637.           ForwardThisMessage((void *) theSpoolFile, (void *) theResource, \
  2638.                                       (void *) theType, (void *) (id))
  2639.  
  2640. typedef CALLBACK_API_C( OSErr , GXCompleteSpoolFileProcPtr )(gxSpoolFile theSpoolFile);
  2641. typedef STACK_UPP_TYPE(GXCompleteSpoolFileProcPtr)                 GXCompleteSpoolFileUPP;
  2642. #if OPAQUE_UPP_TYPES
  2643.     EXTERN_API(GXCompleteSpoolFileUPP)
  2644.     NewGXCompleteSpoolFileUPP       (GXCompleteSpoolFileProcPtr userRoutine);
  2645.  
  2646.     EXTERN_API(void)
  2647.     DisposeGXCompleteSpoolFileUPP    (GXCompleteSpoolFileUPP userUPP);
  2648.  
  2649.     EXTERN_API(OSErr)
  2650.     InvokeGXCompleteSpoolFileUPP    (gxSpoolFile            theSpoolFile,
  2651.                                     GXCompleteSpoolFileUPP    userUPP);
  2652.  
  2653. #else
  2654.     enum { uppGXCompleteSpoolFileProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  2655.     #define NewGXCompleteSpoolFileUPP(userRoutine)                     (GXCompleteSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCompleteSpoolFileProcInfo, GetCurrentArchitecture())
  2656.     #define DisposeGXCompleteSpoolFileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2657.     #define InvokeGXCompleteSpoolFileUPP(theSpoolFile, userUPP)     (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXCompleteSpoolFileProcInfo, (theSpoolFile))
  2658. #endif
  2659. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2660. #define NewGXCompleteSpoolFileProc(userRoutine)                 NewGXCompleteSpoolFileUPP(userRoutine)
  2661. #define CallGXCompleteSpoolFileProc(userRoutine, theSpoolFile)    InvokeGXCompleteSpoolFileUPP(theSpoolFile, userRoutine)
  2662. #define Send_GXCompleteSpoolFile(theSpoolFile) \
  2663.           MacSendMessage(0x00000013, theSpoolFile)
  2664.  
  2665. #define Forward_GXCompleteSpoolFile(theSpoolFile) \
  2666.           ForwardThisMessage((void *) (theSpoolFile))
  2667.  
  2668. typedef CALLBACK_API_C( OSErr , GXCountPagesProcPtr )(gxSpoolFile theSpoolFile, long *numPages);
  2669. typedef STACK_UPP_TYPE(GXCountPagesProcPtr)                     GXCountPagesUPP;
  2670. #if OPAQUE_UPP_TYPES
  2671.     EXTERN_API(GXCountPagesUPP)
  2672.     NewGXCountPagesUPP               (GXCountPagesProcPtr        userRoutine);
  2673.  
  2674.     EXTERN_API(void)
  2675.     DisposeGXCountPagesUPP           (GXCountPagesUPP            userUPP);
  2676.  
  2677.     EXTERN_API(OSErr)
  2678.     InvokeGXCountPagesUPP           (gxSpoolFile                theSpoolFile,
  2679.                                     long *                    numPages,
  2680.                                     GXCountPagesUPP            userUPP);
  2681.  
  2682. #else
  2683.     enum { uppGXCountPagesProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2684.     #define NewGXCountPagesUPP(userRoutine)                         (GXCountPagesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCountPagesProcInfo, GetCurrentArchitecture())
  2685.     #define DisposeGXCountPagesUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2686.     #define InvokeGXCountPagesUPP(theSpoolFile, numPages, userUPP)     (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXCountPagesProcInfo, (theSpoolFile), (numPages))
  2687. #endif
  2688. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2689. #define NewGXCountPagesProc(userRoutine)                         NewGXCountPagesUPP(userRoutine)
  2690. #define CallGXCountPagesProc(userRoutine, theSpoolFile, numPages) InvokeGXCountPagesUPP(theSpoolFile, numPages, userRoutine)
  2691. #define Send_GXCountPages(theSpoolFile, numPages) \
  2692.           MacSendMessage(0x00000014, theSpoolFile, numPages)
  2693.  
  2694. #define Forward_GXCountPages(theSpoolFile, numPages) \
  2695.           ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages))
  2696.  
  2697. typedef CALLBACK_API_C( OSErr , GXDespoolPageProcPtr )(gxSpoolFile theSpoolFile, long numPages, gxFormat theFormat, gxShape *thePage, Boolean *formatChanged);
  2698. typedef STACK_UPP_TYPE(GXDespoolPageProcPtr)                     GXDespoolPageUPP;
  2699. #if OPAQUE_UPP_TYPES
  2700.     EXTERN_API(GXDespoolPageUPP)
  2701.     NewGXDespoolPageUPP               (GXDespoolPageProcPtr    userRoutine);
  2702.  
  2703.     EXTERN_API(void)
  2704.     DisposeGXDespoolPageUPP           (GXDespoolPageUPP        userUPP);
  2705.  
  2706.     EXTERN_API(OSErr)
  2707.     InvokeGXDespoolPageUPP           (gxSpoolFile                theSpoolFile,
  2708.                                     long                    numPages,
  2709.                                     gxFormat                theFormat,
  2710.                                     gxShape *                thePage,
  2711.                                     Boolean *                formatChanged,
  2712.                                     GXDespoolPageUPP        userUPP);
  2713.  
  2714. #else
  2715.     enum { uppGXDespoolPageProcInfo = 0x0000FFE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2716.     #define NewGXDespoolPageUPP(userRoutine)                         (GXDespoolPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolPageProcInfo, GetCurrentArchitecture())
  2717.     #define DisposeGXDespoolPageUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2718.     #define InvokeGXDespoolPageUPP(theSpoolFile, numPages, theFormat, thePage, formatChanged, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXDespoolPageProcInfo, (theSpoolFile), (numPages), (theFormat), (thePage), (formatChanged))
  2719. #endif
  2720. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2721. #define NewGXDespoolPageProc(userRoutine)                         NewGXDespoolPageUPP(userRoutine)
  2722. #define CallGXDespoolPageProc(userRoutine, theSpoolFile, numPages, theFormat, thePage, formatChanged) InvokeGXDespoolPageUPP(theSpoolFile, numPages, theFormat, thePage, formatChanged, userRoutine)
  2723. #define Send_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
  2724.           MacSendMessage(0x00000015, theSpoolFile, numPages, \
  2725.                             theFormat, thePage, formatChanged)
  2726.  
  2727. #define Forward_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
  2728.           ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages), (void *) (theFormat), \
  2729.                                       (void *) (thePage), (void *) (formatChanged))
  2730.  
  2731. typedef CALLBACK_API_C( OSErr , GXDespoolDataProcPtr )(gxSpoolFile theSpoolFile, Ptr data, long *length);
  2732. typedef STACK_UPP_TYPE(GXDespoolDataProcPtr)                     GXDespoolDataUPP;
  2733. #if OPAQUE_UPP_TYPES
  2734.     EXTERN_API(GXDespoolDataUPP)
  2735.     NewGXDespoolDataUPP               (GXDespoolDataProcPtr    userRoutine);
  2736.  
  2737.     EXTERN_API(void)
  2738.     DisposeGXDespoolDataUPP           (GXDespoolDataUPP        userUPP);
  2739.  
  2740.     EXTERN_API(OSErr)
  2741.     InvokeGXDespoolDataUPP           (gxSpoolFile                theSpoolFile,
  2742.                                     Ptr                        data,
  2743.                                     long *                    length,
  2744.                                     GXDespoolDataUPP        userUPP);
  2745.  
  2746. #else
  2747.     enum { uppGXDespoolDataProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2748.     #define NewGXDespoolDataUPP(userRoutine)                         (GXDespoolDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolDataProcInfo, GetCurrentArchitecture())
  2749.     #define DisposeGXDespoolDataUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2750.     #define InvokeGXDespoolDataUPP(theSpoolFile, data, length, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXDespoolDataProcInfo, (theSpoolFile), (data), (length))
  2751. #endif
  2752. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2753. #define NewGXDespoolDataProc(userRoutine)                         NewGXDespoolDataUPP(userRoutine)
  2754. #define CallGXDespoolDataProc(userRoutine, theSpoolFile, data, length) InvokeGXDespoolDataUPP(theSpoolFile, data, length, userRoutine)
  2755. #define Send_GXDespoolData(theSpoolFile, data, length) \
  2756.           MacSendMessage(0x00000016, theSpoolFile, data, length)
  2757.  
  2758. #define Forward_GXDespoolData(theSpoolFile, data, length) \
  2759.           ForwardThisMessage((void *) (theSpoolFile), (void *) (data), (void *) (length))
  2760.  
  2761. typedef CALLBACK_API_C( OSErr , GXDespoolResourceProcPtr )(gxSpoolFile theSpoolFile, ResType theType, long id, Handle *theResource);
  2762. typedef STACK_UPP_TYPE(GXDespoolResourceProcPtr)                 GXDespoolResourceUPP;
  2763. #if OPAQUE_UPP_TYPES
  2764.     EXTERN_API(GXDespoolResourceUPP)
  2765.     NewGXDespoolResourceUPP           (GXDespoolResourceProcPtr userRoutine);
  2766.  
  2767.     EXTERN_API(void)
  2768.     DisposeGXDespoolResourceUPP       (GXDespoolResourceUPP    userUPP);
  2769.  
  2770.     EXTERN_API(OSErr)
  2771.     InvokeGXDespoolResourceUPP       (gxSpoolFile                theSpoolFile,
  2772.                                     ResType                    theType,
  2773.                                     long                    id,
  2774.                                     Handle *                theResource,
  2775.                                     GXDespoolResourceUPP    userUPP);
  2776.  
  2777. #else
  2778.     enum { uppGXDespoolResourceProcInfo = 0x00003FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  2779.     #define NewGXDespoolResourceUPP(userRoutine)                     (GXDespoolResourceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolResourceProcInfo, GetCurrentArchitecture())
  2780.     #define DisposeGXDespoolResourceUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2781.     #define InvokeGXDespoolResourceUPP(theSpoolFile, theType, id, theResource, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXDespoolResourceProcInfo, (theSpoolFile), (theType), (id), (theResource))
  2782. #endif
  2783. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2784. #define NewGXDespoolResourceProc(userRoutine)                     NewGXDespoolResourceUPP(userRoutine)
  2785. #define CallGXDespoolResourceProc(userRoutine, theSpoolFile, theType, id, theResource) InvokeGXDespoolResourceUPP(theSpoolFile, theType, id, theResource, userRoutine)
  2786. #define Send_GXDespoolResource(theSpoolFile, theType, id, theResource) \
  2787.           MacSendMessage(0x00000017, theSpoolFile, theType, \
  2788.                             id, theResource)
  2789.  
  2790. #define Forward_GXDespoolResource(theSpoolFile, theType, id, theResource) \
  2791.           ForwardThisMessage((void *) (theSpoolFile), (void *) (theType), (void *) (id), \
  2792.                                       (void *) (theResource))
  2793.  
  2794. typedef CALLBACK_API_C( OSErr , GXCloseSpoolFileProcPtr )(gxSpoolFile theSpoolFile, long closeOptions);
  2795. typedef STACK_UPP_TYPE(GXCloseSpoolFileProcPtr)                 GXCloseSpoolFileUPP;
  2796. #if OPAQUE_UPP_TYPES
  2797.     EXTERN_API(GXCloseSpoolFileUPP)
  2798.     NewGXCloseSpoolFileUPP           (GXCloseSpoolFileProcPtr    userRoutine);
  2799.  
  2800.     EXTERN_API(void)
  2801.     DisposeGXCloseSpoolFileUPP       (GXCloseSpoolFileUPP        userUPP);
  2802.  
  2803.     EXTERN_API(OSErr)
  2804.     InvokeGXCloseSpoolFileUPP       (gxSpoolFile                theSpoolFile,
  2805.                                     long                    closeOptions,
  2806.                                     GXCloseSpoolFileUPP        userUPP);
  2807.  
  2808. #else
  2809.     enum { uppGXCloseSpoolFileProcInfo = 0x000003E1 };                 /* 2_bytes Func(4_bytes, 4_bytes) */
  2810.     #define NewGXCloseSpoolFileUPP(userRoutine)                     (GXCloseSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseSpoolFileProcInfo, GetCurrentArchitecture())
  2811.     #define DisposeGXCloseSpoolFileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2812.     #define InvokeGXCloseSpoolFileUPP(theSpoolFile, closeOptions, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXCloseSpoolFileProcInfo, (theSpoolFile), (closeOptions))
  2813. #endif
  2814. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2815. #define NewGXCloseSpoolFileProc(userRoutine)                     NewGXCloseSpoolFileUPP(userRoutine)
  2816. #define CallGXCloseSpoolFileProc(userRoutine, theSpoolFile, closeOptions) InvokeGXCloseSpoolFileUPP(theSpoolFile, closeOptions, userRoutine)
  2817. #define Send_GXCloseSpoolFile(theSpoolFile, closeOptions) \
  2818.           MacSendMessage(0x00000018, theSpoolFile, closeOptions)
  2819.  
  2820. #define Forward_GXCloseSpoolFile(theSpoolFile, closeOptions) \
  2821.           ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
  2822.  
  2823. typedef CALLBACK_API_C( OSErr , GXStartJobProcPtr )(StringPtr docName, long pageCount);
  2824. typedef STACK_UPP_TYPE(GXStartJobProcPtr)                         GXStartJobUPP;
  2825. #if OPAQUE_UPP_TYPES
  2826.     EXTERN_API(GXStartJobUPP)
  2827.     NewGXStartJobUPP               (GXStartJobProcPtr        userRoutine);
  2828.  
  2829.     EXTERN_API(void)
  2830.     DisposeGXStartJobUPP           (GXStartJobUPP            userUPP);
  2831.  
  2832.     EXTERN_API(OSErr)
  2833.     InvokeGXStartJobUPP               (StringPtr                docName,
  2834.                                     long                    pageCount,
  2835.                                     GXStartJobUPP            userUPP);
  2836.  
  2837. #else
  2838.     enum { uppGXStartJobProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2839.     #define NewGXStartJobUPP(userRoutine)                             (GXStartJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartJobProcInfo, GetCurrentArchitecture())
  2840.     #define DisposeGXStartJobUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2841.     #define InvokeGXStartJobUPP(docName, pageCount, userUPP)         (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXStartJobProcInfo, (docName), (pageCount))
  2842. #endif
  2843. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2844. #define NewGXStartJobProc(userRoutine)                             NewGXStartJobUPP(userRoutine)
  2845. #define CallGXStartJobProc(userRoutine, docName, pageCount)        InvokeGXStartJobUPP(docName, pageCount, userRoutine)
  2846. #define Send_GXStartJob(docName, pageCount) \
  2847.           MacSendMessage(0x00000019, docName, pageCount)
  2848.  
  2849. #define Forward_GXStartJob(docName, pageCount) \
  2850.           ForwardThisMessage((void *) (docName), (void *) (pageCount))
  2851.  
  2852. typedef CALLBACK_API_C( OSErr , GXFinishJobProcPtr )(void );
  2853. typedef STACK_UPP_TYPE(GXFinishJobProcPtr)                         GXFinishJobUPP;
  2854. #if OPAQUE_UPP_TYPES
  2855.     EXTERN_API(GXFinishJobUPP)
  2856.     NewGXFinishJobUPP               (GXFinishJobProcPtr        userRoutine);
  2857.  
  2858.     EXTERN_API(void)
  2859.     DisposeGXFinishJobUPP           (GXFinishJobUPP            userUPP);
  2860.  
  2861.     EXTERN_API(OSErr)
  2862.     InvokeGXFinishJobUPP           (GXFinishJobUPP            userUPP);
  2863.  
  2864. #else
  2865.     enum { uppGXFinishJobProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2866.     #define NewGXFinishJobUPP(userRoutine)                             (GXFinishJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishJobProcInfo, GetCurrentArchitecture())
  2867.     #define DisposeGXFinishJobUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2868.     #define InvokeGXFinishJobUPP(userUPP)                             (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishJobProcInfo)
  2869. #endif
  2870. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2871. #define NewGXFinishJobProc(userRoutine)                         NewGXFinishJobUPP(userRoutine)
  2872. #define CallGXFinishJobProc(userRoutine)                        InvokeGXFinishJobUPP(userRoutine)
  2873. #define Send_GXFinishJob() MacSendMessage(0x0000001A)
  2874. #define Forward_GXFinishJob() ForwardThisMessage((void *) (0))
  2875.  
  2876. typedef CALLBACK_API_C( OSErr , GXStartPageProcPtr )(gxFormat theFormat, long numViewPorts, gxViewPort *viewPortList);
  2877. typedef STACK_UPP_TYPE(GXStartPageProcPtr)                         GXStartPageUPP;
  2878. #if OPAQUE_UPP_TYPES
  2879.     EXTERN_API(GXStartPageUPP)
  2880.     NewGXStartPageUPP               (GXStartPageProcPtr        userRoutine);
  2881.  
  2882.     EXTERN_API(void)
  2883.     DisposeGXStartPageUPP           (GXStartPageUPP            userUPP);
  2884.  
  2885.     EXTERN_API(OSErr)
  2886.     InvokeGXStartPageUPP           (gxFormat                theFormat,
  2887.                                     long                    numViewPorts,
  2888.                                     gxViewPort *            viewPortList,
  2889.                                     GXStartPageUPP            userUPP);
  2890.  
  2891. #else
  2892.     enum { uppGXStartPageProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  2893.     #define NewGXStartPageUPP(userRoutine)                             (GXStartPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartPageProcInfo, GetCurrentArchitecture())
  2894.     #define DisposeGXStartPageUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2895.     #define InvokeGXStartPageUPP(theFormat, numViewPorts, viewPortList, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXStartPageProcInfo, (theFormat), (numViewPorts), (viewPortList))
  2896. #endif
  2897. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2898. #define NewGXStartPageProc(userRoutine)                         NewGXStartPageUPP(userRoutine)
  2899. #define CallGXStartPageProc(userRoutine, theFormat, numViewPorts, viewPortList) InvokeGXStartPageUPP(theFormat, numViewPorts, viewPortList, userRoutine)
  2900. #define Send_GXStartPage(theFormat, numViewPorts, viewPortList) \
  2901.           MacSendMessage(0x0000001B, theFormat, numViewPorts, viewPortList)
  2902.  
  2903. #define Forward_GXStartPage(theFormat, numViewPorts, viewPortList) \
  2904.           ForwardThisMessage((void *) (theFormat), (void *) (numViewPorts), (void *) (viewPortList))
  2905.  
  2906. typedef CALLBACK_API_C( OSErr , GXFinishPageProcPtr )(void );
  2907. typedef STACK_UPP_TYPE(GXFinishPageProcPtr)                     GXFinishPageUPP;
  2908. #if OPAQUE_UPP_TYPES
  2909.     EXTERN_API(GXFinishPageUPP)
  2910.     NewGXFinishPageUPP               (GXFinishPageProcPtr        userRoutine);
  2911.  
  2912.     EXTERN_API(void)
  2913.     DisposeGXFinishPageUPP           (GXFinishPageUPP            userUPP);
  2914.  
  2915.     EXTERN_API(OSErr)
  2916.     InvokeGXFinishPageUPP           (GXFinishPageUPP            userUPP);
  2917.  
  2918. #else
  2919.     enum { uppGXFinishPageProcInfo = 0x00000021 };                     /* 2_bytes Func() */
  2920.     #define NewGXFinishPageUPP(userRoutine)                         (GXFinishPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishPageProcInfo, GetCurrentArchitecture())
  2921.     #define DisposeGXFinishPageUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  2922.     #define InvokeGXFinishPageUPP(userUPP)                             (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishPageProcInfo)
  2923. #endif
  2924. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2925. #define NewGXFinishPageProc(userRoutine)                         NewGXFinishPageUPP(userRoutine)
  2926. #define CallGXFinishPageProc(userRoutine)                        InvokeGXFinishPageUPP(userRoutine)
  2927. #define Send_GXFinishPage() MacSendMessage(0x0000001C)
  2928. #define Forward_GXFinishPage() ForwardThisMessage((void *) (0))
  2929.  
  2930. typedef CALLBACK_API_C( OSErr , GXPrintPageProcPtr )(gxFormat theFormat, gxShape thePage);
  2931. typedef STACK_UPP_TYPE(GXPrintPageProcPtr)                         GXPrintPageUPP;
  2932. #if OPAQUE_UPP_TYPES
  2933.     EXTERN_API(GXPrintPageUPP)
  2934.     NewGXPrintPageUPP               (GXPrintPageProcPtr        userRoutine);
  2935.  
  2936.     EXTERN_API(void)
  2937.     DisposeGXPrintPageUPP           (GXPrintPageUPP            userUPP);
  2938.  
  2939.     EXTERN_API(OSErr)
  2940.     InvokeGXPrintPageUPP           (gxFormat                theFormat,
  2941.                                     gxShape                    thePage,
  2942.                                     GXPrintPageUPP            userUPP);
  2943.  
  2944. #else
  2945.     enum { uppGXPrintPageProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  2946.     #define NewGXPrintPageUPP(userRoutine)                             (GXPrintPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintPageProcInfo, GetCurrentArchitecture())
  2947.     #define DisposeGXPrintPageUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  2948.     #define InvokeGXPrintPageUPP(theFormat, thePage, userUPP)         (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXPrintPageProcInfo, (theFormat), (thePage))
  2949. #endif
  2950. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2951. #define NewGXPrintPageProc(userRoutine)                         NewGXPrintPageUPP(userRoutine)
  2952. #define CallGXPrintPageProc(userRoutine, theFormat, thePage)    InvokeGXPrintPageUPP(theFormat, thePage, userRoutine)
  2953. #define Send_GXPrintPage(theFormat, thePage) \
  2954.           MacSendMessage(0x0000001D, theFormat, thePage)
  2955.  
  2956. #define Forward_GXPrintPage(theFormat, thePage) \
  2957.           ForwardThisMessage((void *) (theFormat), (void *) (thePage))
  2958.  
  2959. typedef CALLBACK_API_C( OSErr , GXSetupImageDataProcPtr )(void *imageData);
  2960. typedef STACK_UPP_TYPE(GXSetupImageDataProcPtr)                 GXSetupImageDataUPP;
  2961. #if OPAQUE_UPP_TYPES
  2962.     EXTERN_API(GXSetupImageDataUPP)
  2963.     NewGXSetupImageDataUPP           (GXSetupImageDataProcPtr    userRoutine);
  2964.  
  2965.     EXTERN_API(void)
  2966.     DisposeGXSetupImageDataUPP       (GXSetupImageDataUPP        userUPP);
  2967.  
  2968.     EXTERN_API(OSErr)
  2969.     InvokeGXSetupImageDataUPP       (void *                    imageData,
  2970.                                     GXSetupImageDataUPP        userUPP);
  2971.  
  2972. #else
  2973.     enum { uppGXSetupImageDataProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  2974.     #define NewGXSetupImageDataUPP(userRoutine)                     (GXSetupImageDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupImageDataProcInfo, GetCurrentArchitecture())
  2975.     #define DisposeGXSetupImageDataUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  2976.     #define InvokeGXSetupImageDataUPP(imageData, userUPP)             (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXSetupImageDataProcInfo, (imageData))
  2977. #endif
  2978. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  2979. #define NewGXSetupImageDataProc(userRoutine)                     NewGXSetupImageDataUPP(userRoutine)
  2980. #define CallGXSetupImageDataProc(userRoutine, imageData)        InvokeGXSetupImageDataUPP(imageData, userRoutine)
  2981. #define Send_GXSetupImageData(imageData) \
  2982.           MacSendMessage(0x0000001E, imageData)
  2983.  
  2984. #define Forward_GXSetupImageData(imageData) \
  2985.           ForwardThisMessage((void *) (imageData))
  2986.  
  2987. typedef CALLBACK_API_C( OSErr , GXImageJobProcPtr )(gxSpoolFile theSpoolFile, long *closeOptions);
  2988. typedef STACK_UPP_TYPE(GXImageJobProcPtr)                         GXImageJobUPP;
  2989. #if OPAQUE_UPP_TYPES
  2990.     EXTERN_API(GXImageJobUPP)
  2991.     NewGXImageJobUPP               (GXImageJobProcPtr        userRoutine);
  2992.  
  2993.     EXTERN_API(void)
  2994.     DisposeGXImageJobUPP           (GXImageJobUPP            userUPP);
  2995.  
  2996.     EXTERN_API(OSErr)
  2997.     InvokeGXImageJobUPP               (gxSpoolFile                theSpoolFile,
  2998.                                     long *                    closeOptions,
  2999.                                     GXImageJobUPP            userUPP);
  3000.  
  3001. #else
  3002.     enum { uppGXImageJobProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  3003.     #define NewGXImageJobUPP(userRoutine)                             (GXImageJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageJobProcInfo, GetCurrentArchitecture())
  3004.     #define DisposeGXImageJobUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  3005.     #define InvokeGXImageJobUPP(theSpoolFile, closeOptions, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXImageJobProcInfo, (theSpoolFile), (closeOptions))
  3006. #endif
  3007. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3008. #define NewGXImageJobProc(userRoutine)                             NewGXImageJobUPP(userRoutine)
  3009. #define CallGXImageJobProc(userRoutine, theSpoolFile, closeOptions) InvokeGXImageJobUPP(theSpoolFile, closeOptions, userRoutine)
  3010. #define Send_GXImageJob(theSpoolFile, closeOptions) \
  3011.           MacSendMessage(0x0000001F, theSpoolFile, closeOptions)
  3012.  
  3013. #define Forward_GXImageJob(theSpoolFile, closeOptions) \
  3014.           ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
  3015.  
  3016. typedef CALLBACK_API_C( OSErr , GXImageDocumentProcPtr )(gxSpoolFile theSpoolFile, void *imageData);
  3017. typedef STACK_UPP_TYPE(GXImageDocumentProcPtr)                     GXImageDocumentUPP;
  3018. #if OPAQUE_UPP_TYPES
  3019.     EXTERN_API(GXImageDocumentUPP)
  3020.     NewGXImageDocumentUPP           (GXImageDocumentProcPtr    userRoutine);
  3021.  
  3022.     EXTERN_API(void)
  3023.     DisposeGXImageDocumentUPP       (GXImageDocumentUPP        userUPP);
  3024.  
  3025.     EXTERN_API(OSErr)
  3026.     InvokeGXImageDocumentUPP       (gxSpoolFile                theSpoolFile,
  3027.                                     void *                    imageData,
  3028.                                     GXImageDocumentUPP        userUPP);
  3029.  
  3030. #else
  3031.     enum { uppGXImageDocumentProcInfo = 0x000003E1 };                 /* 2_bytes Func(4_bytes, 4_bytes) */
  3032.     #define NewGXImageDocumentUPP(userRoutine)                         (GXImageDocumentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageDocumentProcInfo, GetCurrentArchitecture())
  3033.     #define DisposeGXImageDocumentUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3034.     #define InvokeGXImageDocumentUPP(theSpoolFile, imageData, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXImageDocumentProcInfo, (theSpoolFile), (imageData))
  3035. #endif
  3036. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3037. #define NewGXImageDocumentProc(userRoutine)                     NewGXImageDocumentUPP(userRoutine)
  3038. #define CallGXImageDocumentProc(userRoutine, theSpoolFile, imageData) InvokeGXImageDocumentUPP(theSpoolFile, imageData, userRoutine)
  3039. #define Send_GXImageDocument(theSpoolFile, imageData) \
  3040.           MacSendMessage(0x00000020, theSpoolFile, imageData)
  3041.  
  3042. #define Forward_GXImageDocument(theSpoolFile, imageData) \
  3043.           ForwardThisMessage((void *) (theSpoolFile), (void *) (imageData))
  3044.  
  3045. typedef CALLBACK_API_C( OSErr , GXImagePageProcPtr )(gxSpoolFile theSpoolFile, long pageNumber, gxFormat theFormat, void *imageData);
  3046. typedef STACK_UPP_TYPE(GXImagePageProcPtr)                         GXImagePageUPP;
  3047. #if OPAQUE_UPP_TYPES
  3048.     EXTERN_API(GXImagePageUPP)
  3049.     NewGXImagePageUPP               (GXImagePageProcPtr        userRoutine);
  3050.  
  3051.     EXTERN_API(void)
  3052.     DisposeGXImagePageUPP           (GXImagePageUPP            userUPP);
  3053.  
  3054.     EXTERN_API(OSErr)
  3055.     InvokeGXImagePageUPP           (gxSpoolFile                theSpoolFile,
  3056.                                     long                    pageNumber,
  3057.                                     gxFormat                theFormat,
  3058.                                     void *                    imageData,
  3059.                                     GXImagePageUPP            userUPP);
  3060.  
  3061. #else
  3062.     enum { uppGXImagePageProcInfo = 0x00003FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3063.     #define NewGXImagePageUPP(userRoutine)                             (GXImagePageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImagePageProcInfo, GetCurrentArchitecture())
  3064.     #define DisposeGXImagePageUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  3065.     #define InvokeGXImagePageUPP(theSpoolFile, pageNumber, theFormat, imageData, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXImagePageProcInfo, (theSpoolFile), (pageNumber), (theFormat), (imageData))
  3066. #endif
  3067. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3068. #define NewGXImagePageProc(userRoutine)                         NewGXImagePageUPP(userRoutine)
  3069. #define CallGXImagePageProc(userRoutine, theSpoolFile, pageNumber, theFormat, imageData) InvokeGXImagePageUPP(theSpoolFile, pageNumber, theFormat, imageData, userRoutine)
  3070. #define Send_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
  3071.           MacSendMessage(0x00000021, theSpoolFile, pageNumber, theFormat, imageData)
  3072.  
  3073. #define Forward_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
  3074.           ForwardThisMessage((void *) (theSpoolFile), (void *) (pageNumber), (void *) (theFormat), \
  3075.                                       (void *) (imageData))
  3076.  
  3077. typedef CALLBACK_API_C( OSErr , GXRenderPageProcPtr )(gxFormat theFormat, gxShape thePage, gxPageInfoRecord *pageInfo, void *imageData);
  3078. typedef STACK_UPP_TYPE(GXRenderPageProcPtr)                     GXRenderPageUPP;
  3079. #if OPAQUE_UPP_TYPES
  3080.     EXTERN_API(GXRenderPageUPP)
  3081.     NewGXRenderPageUPP               (GXRenderPageProcPtr        userRoutine);
  3082.  
  3083.     EXTERN_API(void)
  3084.     DisposeGXRenderPageUPP           (GXRenderPageUPP            userUPP);
  3085.  
  3086.     EXTERN_API(OSErr)
  3087.     InvokeGXRenderPageUPP           (gxFormat                theFormat,
  3088.                                     gxShape                    thePage,
  3089.                                     gxPageInfoRecord *        pageInfo,
  3090.                                     void *                    imageData,
  3091.                                     GXRenderPageUPP            userUPP);
  3092.  
  3093. #else
  3094.     enum { uppGXRenderPageProcInfo = 0x00003FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3095.     #define NewGXRenderPageUPP(userRoutine)                         (GXRenderPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXRenderPageProcInfo, GetCurrentArchitecture())
  3096.     #define DisposeGXRenderPageUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3097.     #define InvokeGXRenderPageUPP(theFormat, thePage, pageInfo, imageData, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXRenderPageProcInfo, (theFormat), (thePage), (pageInfo), (imageData))
  3098. #endif
  3099. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3100. #define NewGXRenderPageProc(userRoutine)                         NewGXRenderPageUPP(userRoutine)
  3101. #define CallGXRenderPageProc(userRoutine, theFormat, thePage, pageInfo, imageData) InvokeGXRenderPageUPP(theFormat, thePage, pageInfo, imageData, userRoutine)
  3102. #define Send_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
  3103.           MacSendMessage(0x00000022, theFormat, thePage, pageInfo, imageData)
  3104.  
  3105. #define Forward_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
  3106.           ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (pageInfo), (void *) (imageData))
  3107.  
  3108. typedef CALLBACK_API_C( OSErr , GXCreateImageFileProcPtr )(FSSpecPtr pFileSpec, long imageFileOptions, long *theImageFile);
  3109. typedef STACK_UPP_TYPE(GXCreateImageFileProcPtr)                 GXCreateImageFileUPP;
  3110. #if OPAQUE_UPP_TYPES
  3111.     EXTERN_API(GXCreateImageFileUPP)
  3112.     NewGXCreateImageFileUPP           (GXCreateImageFileProcPtr userRoutine);
  3113.  
  3114.     EXTERN_API(void)
  3115.     DisposeGXCreateImageFileUPP       (GXCreateImageFileUPP    userUPP);
  3116.  
  3117.     EXTERN_API(OSErr)
  3118.     InvokeGXCreateImageFileUPP       (FSSpecPtr                pFileSpec,
  3119.                                     long                    imageFileOptions,
  3120.                                     long *                    theImageFile,
  3121.                                     GXCreateImageFileUPP    userUPP);
  3122.  
  3123. #else
  3124.     enum { uppGXCreateImageFileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  3125.     #define NewGXCreateImageFileUPP(userRoutine)                     (GXCreateImageFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateImageFileProcInfo, GetCurrentArchitecture())
  3126.     #define DisposeGXCreateImageFileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3127.     #define InvokeGXCreateImageFileUPP(pFileSpec, imageFileOptions, theImageFile, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXCreateImageFileProcInfo, (pFileSpec), (imageFileOptions), (theImageFile))
  3128. #endif
  3129. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3130. #define NewGXCreateImageFileProc(userRoutine)                     NewGXCreateImageFileUPP(userRoutine)
  3131. #define CallGXCreateImageFileProc(userRoutine, pFileSpec, imageFileOptions, theImageFile) InvokeGXCreateImageFileUPP(pFileSpec, imageFileOptions, theImageFile, userRoutine)
  3132. #define Send_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
  3133.           MacSendMessage(0x00000023, pFileSpec, imageFileOptions, theImageFile)
  3134.  
  3135. #define Forward_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
  3136.           ForwardThisMessage((void *) (pFileSpec), (void *) (imageFileOptions), (void *) (theImageFile))
  3137.  
  3138. typedef CALLBACK_API_C( OSErr , GXOpenConnectionProcPtr )(void );
  3139. typedef STACK_UPP_TYPE(GXOpenConnectionProcPtr)                 GXOpenConnectionUPP;
  3140. #if OPAQUE_UPP_TYPES
  3141.     EXTERN_API(GXOpenConnectionUPP)
  3142.     NewGXOpenConnectionUPP           (GXOpenConnectionProcPtr    userRoutine);
  3143.  
  3144.     EXTERN_API(void)
  3145.     DisposeGXOpenConnectionUPP       (GXOpenConnectionUPP        userUPP);
  3146.  
  3147.     EXTERN_API(OSErr)
  3148.     InvokeGXOpenConnectionUPP       (GXOpenConnectionUPP        userUPP);
  3149.  
  3150. #else
  3151.     enum { uppGXOpenConnectionProcInfo = 0x00000021 };                 /* 2_bytes Func() */
  3152.     #define NewGXOpenConnectionUPP(userRoutine)                     (GXOpenConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionProcInfo, GetCurrentArchitecture())
  3153.     #define DisposeGXOpenConnectionUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3154.     #define InvokeGXOpenConnectionUPP(userUPP)                         (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXOpenConnectionProcInfo)
  3155. #endif
  3156. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3157. #define NewGXOpenConnectionProc(userRoutine)                     NewGXOpenConnectionUPP(userRoutine)
  3158. #define CallGXOpenConnectionProc(userRoutine)                    InvokeGXOpenConnectionUPP(userRoutine)
  3159. #define Send_GXOpenConnection() MacSendMessage(0x00000024)
  3160. #define Forward_GXOpenConnection() ForwardThisMessage((void *) (0))
  3161.  
  3162. typedef CALLBACK_API_C( OSErr , GXCloseConnectionProcPtr )(void );
  3163. typedef STACK_UPP_TYPE(GXCloseConnectionProcPtr)                 GXCloseConnectionUPP;
  3164. #if OPAQUE_UPP_TYPES
  3165.     EXTERN_API(GXCloseConnectionUPP)
  3166.     NewGXCloseConnectionUPP           (GXCloseConnectionProcPtr userRoutine);
  3167.  
  3168.     EXTERN_API(void)
  3169.     DisposeGXCloseConnectionUPP       (GXCloseConnectionUPP    userUPP);
  3170.  
  3171.     EXTERN_API(OSErr)
  3172.     InvokeGXCloseConnectionUPP       (GXCloseConnectionUPP    userUPP);
  3173.  
  3174. #else
  3175.     enum { uppGXCloseConnectionProcInfo = 0x00000021 };             /* 2_bytes Func() */
  3176.     #define NewGXCloseConnectionUPP(userRoutine)                     (GXCloseConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseConnectionProcInfo, GetCurrentArchitecture())
  3177.     #define DisposeGXCloseConnectionUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3178.     #define InvokeGXCloseConnectionUPP(userUPP)                     (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCloseConnectionProcInfo)
  3179. #endif
  3180. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3181. #define NewGXCloseConnectionProc(userRoutine)                     NewGXCloseConnectionUPP(userRoutine)
  3182. #define CallGXCloseConnectionProc(userRoutine)                    InvokeGXCloseConnectionUPP(userRoutine)
  3183. #define Send_GXCloseConnection() MacSendMessage(0x00000025)
  3184. #define Forward_GXCloseConnection() ForwardThisMessage((void *) (0))
  3185.  
  3186. typedef CALLBACK_API_C( OSErr , GXStartSendPageProcPtr )(gxFormat theFormat);
  3187. typedef STACK_UPP_TYPE(GXStartSendPageProcPtr)                     GXStartSendPageUPP;
  3188. #if OPAQUE_UPP_TYPES
  3189.     EXTERN_API(GXStartSendPageUPP)
  3190.     NewGXStartSendPageUPP           (GXStartSendPageProcPtr    userRoutine);
  3191.  
  3192.     EXTERN_API(void)
  3193.     DisposeGXStartSendPageUPP       (GXStartSendPageUPP        userUPP);
  3194.  
  3195.     EXTERN_API(OSErr)
  3196.     InvokeGXStartSendPageUPP       (gxFormat                theFormat,
  3197.                                     GXStartSendPageUPP        userUPP);
  3198.  
  3199. #else
  3200.     enum { uppGXStartSendPageProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  3201.     #define NewGXStartSendPageUPP(userRoutine)                         (GXStartSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartSendPageProcInfo, GetCurrentArchitecture())
  3202.     #define DisposeGXStartSendPageUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3203.     #define InvokeGXStartSendPageUPP(theFormat, userUPP)             (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXStartSendPageProcInfo, (theFormat))
  3204. #endif
  3205. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3206. #define NewGXStartSendPageProc(userRoutine)                     NewGXStartSendPageUPP(userRoutine)
  3207. #define CallGXStartSendPageProc(userRoutine, theFormat)            InvokeGXStartSendPageUPP(theFormat, userRoutine)
  3208. #define Send_GXStartSendPage(theFormat) MacSendMessage(0x00000026, theFormat)
  3209. #define Forward_GXStartSendPage(theFormat) ForwardThisMessage((void *) (theFormat))
  3210.  
  3211. typedef CALLBACK_API_C( OSErr , GXFinishSendPageProcPtr )(void );
  3212. typedef STACK_UPP_TYPE(GXFinishSendPageProcPtr)                 GXFinishSendPageUPP;
  3213. #if OPAQUE_UPP_TYPES
  3214.     EXTERN_API(GXFinishSendPageUPP)
  3215.     NewGXFinishSendPageUPP           (GXFinishSendPageProcPtr    userRoutine);
  3216.  
  3217.     EXTERN_API(void)
  3218.     DisposeGXFinishSendPageUPP       (GXFinishSendPageUPP        userUPP);
  3219.  
  3220.     EXTERN_API(OSErr)
  3221.     InvokeGXFinishSendPageUPP       (GXFinishSendPageUPP        userUPP);
  3222.  
  3223. #else
  3224.     enum { uppGXFinishSendPageProcInfo = 0x00000021 };                 /* 2_bytes Func() */
  3225.     #define NewGXFinishSendPageUPP(userRoutine)                     (GXFinishSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPageProcInfo, GetCurrentArchitecture())
  3226.     #define DisposeGXFinishSendPageUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3227.     #define InvokeGXFinishSendPageUPP(userUPP)                         (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishSendPageProcInfo)
  3228. #endif
  3229. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3230. #define NewGXFinishSendPageProc(userRoutine)                     NewGXFinishSendPageUPP(userRoutine)
  3231. #define CallGXFinishSendPageProc(userRoutine)                    InvokeGXFinishSendPageUPP(userRoutine)
  3232. #define Send_GXFinishSendPage() MacSendMessage(0x00000027)
  3233. #define Forward_GXFinishSendPage() ForwardThisMessage((void *) (0))
  3234.  
  3235. typedef CALLBACK_API_C( OSErr , GXWriteDataProcPtr )(Ptr data, long length);
  3236. typedef STACK_UPP_TYPE(GXWriteDataProcPtr)                         GXWriteDataUPP;
  3237. #if OPAQUE_UPP_TYPES
  3238.     EXTERN_API(GXWriteDataUPP)
  3239.     NewGXWriteDataUPP               (GXWriteDataProcPtr        userRoutine);
  3240.  
  3241.     EXTERN_API(void)
  3242.     DisposeGXWriteDataUPP           (GXWriteDataUPP            userUPP);
  3243.  
  3244.     EXTERN_API(OSErr)
  3245.     InvokeGXWriteDataUPP           (Ptr                        data,
  3246.                                     long                    length,
  3247.                                     GXWriteDataUPP            userUPP);
  3248.  
  3249. #else
  3250.     enum { uppGXWriteDataProcInfo = 0x000003E1 };                     /* 2_bytes Func(4_bytes, 4_bytes) */
  3251.     #define NewGXWriteDataUPP(userRoutine)                             (GXWriteDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteDataProcInfo, GetCurrentArchitecture())
  3252.     #define DisposeGXWriteDataUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  3253.     #define InvokeGXWriteDataUPP(data, length, userUPP)             (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXWriteDataProcInfo, (data), (length))
  3254. #endif
  3255. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3256. #define NewGXWriteDataProc(userRoutine)                         NewGXWriteDataUPP(userRoutine)
  3257. #define CallGXWriteDataProc(userRoutine, data, length)            InvokeGXWriteDataUPP(data, length, userRoutine)
  3258. #define Send_GXWriteData(data, length) MacSendMessage(0x00000028, data, length)
  3259. #define Forward_GXWriteData(data, length) ForwardThisMessage((void *) (data), (void *) (length))
  3260.  
  3261. typedef CALLBACK_API_C( OSErr , GXBufferDataProcPtr )(Ptr data, long length, long bufferOptions);
  3262. typedef STACK_UPP_TYPE(GXBufferDataProcPtr)                     GXBufferDataUPP;
  3263. #if OPAQUE_UPP_TYPES
  3264.     EXTERN_API(GXBufferDataUPP)
  3265.     NewGXBufferDataUPP               (GXBufferDataProcPtr        userRoutine);
  3266.  
  3267.     EXTERN_API(void)
  3268.     DisposeGXBufferDataUPP           (GXBufferDataUPP            userUPP);
  3269.  
  3270.     EXTERN_API(OSErr)
  3271.     InvokeGXBufferDataUPP           (Ptr                        data,
  3272.                                     long                    length,
  3273.                                     long                    bufferOptions,
  3274.                                     GXBufferDataUPP            userUPP);
  3275.  
  3276. #else
  3277.     enum { uppGXBufferDataProcInfo = 0x00000FE1 };                     /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  3278.     #define NewGXBufferDataUPP(userRoutine)                         (GXBufferDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXBufferDataProcInfo, GetCurrentArchitecture())
  3279.     #define DisposeGXBufferDataUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3280.     #define InvokeGXBufferDataUPP(data, length, bufferOptions, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXBufferDataProcInfo, (data), (length), (bufferOptions))
  3281. #endif
  3282. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3283. #define NewGXBufferDataProc(userRoutine)                         NewGXBufferDataUPP(userRoutine)
  3284. #define CallGXBufferDataProc(userRoutine, data, length, bufferOptions) InvokeGXBufferDataUPP(data, length, bufferOptions, userRoutine)
  3285. #define Send_GXBufferData(data, length, bufferOptions) \
  3286.           MacSendMessage(0x00000029, data, length, bufferOptions)
  3287.  
  3288. #define Forward_GXBufferData(data, length, bufferOptions) \
  3289.           ForwardThisMessage((void *) (data), (void *) (length), (void *) (bufferOptions))
  3290.  
  3291. typedef CALLBACK_API_C( OSErr , GXDumpBufferProcPtr )(gxPrintingBuffer *theBuffer);
  3292. typedef STACK_UPP_TYPE(GXDumpBufferProcPtr)                     GXDumpBufferUPP;
  3293. #if OPAQUE_UPP_TYPES
  3294.     EXTERN_API(GXDumpBufferUPP)
  3295.     NewGXDumpBufferUPP               (GXDumpBufferProcPtr        userRoutine);
  3296.  
  3297.     EXTERN_API(void)
  3298.     DisposeGXDumpBufferUPP           (GXDumpBufferUPP            userUPP);
  3299.  
  3300.     EXTERN_API(OSErr)
  3301.     InvokeGXDumpBufferUPP           (gxPrintingBuffer *        theBuffer,
  3302.                                     GXDumpBufferUPP            userUPP);
  3303.  
  3304. #else
  3305.     enum { uppGXDumpBufferProcInfo = 0x000000E1 };                     /* 2_bytes Func(4_bytes) */
  3306.     #define NewGXDumpBufferUPP(userRoutine)                         (GXDumpBufferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDumpBufferProcInfo, GetCurrentArchitecture())
  3307.     #define DisposeGXDumpBufferUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3308.     #define InvokeGXDumpBufferUPP(theBuffer, userUPP)                 (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDumpBufferProcInfo, (theBuffer))
  3309. #endif
  3310. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3311. #define NewGXDumpBufferProc(userRoutine)                         NewGXDumpBufferUPP(userRoutine)
  3312. #define CallGXDumpBufferProc(userRoutine, theBuffer)            InvokeGXDumpBufferUPP(theBuffer, userRoutine)
  3313. #define Send_GXDumpBuffer(theBuffer) MacSendMessage(0x0000002A, theBuffer)
  3314. #define Forward_GXDumpBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
  3315.  
  3316. typedef CALLBACK_API_C( OSErr , GXFreeBufferProcPtr )(gxPrintingBuffer *theBuffer);
  3317. typedef STACK_UPP_TYPE(GXFreeBufferProcPtr)                     GXFreeBufferUPP;
  3318. #if OPAQUE_UPP_TYPES
  3319.     EXTERN_API(GXFreeBufferUPP)
  3320.     NewGXFreeBufferUPP               (GXFreeBufferProcPtr        userRoutine);
  3321.  
  3322.     EXTERN_API(void)
  3323.     DisposeGXFreeBufferUPP           (GXFreeBufferUPP            userUPP);
  3324.  
  3325.     EXTERN_API(OSErr)
  3326.     InvokeGXFreeBufferUPP           (gxPrintingBuffer *        theBuffer,
  3327.                                     GXFreeBufferUPP            userUPP);
  3328.  
  3329. #else
  3330.     enum { uppGXFreeBufferProcInfo = 0x000000E1 };                     /* 2_bytes Func(4_bytes) */
  3331.     #define NewGXFreeBufferUPP(userRoutine)                         (GXFreeBufferUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFreeBufferProcInfo, GetCurrentArchitecture())
  3332.     #define DisposeGXFreeBufferUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3333.     #define InvokeGXFreeBufferUPP(theBuffer, userUPP)                 (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXFreeBufferProcInfo, (theBuffer))
  3334. #endif
  3335. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3336. #define NewGXFreeBufferProc(userRoutine)                         NewGXFreeBufferUPP(userRoutine)
  3337. #define CallGXFreeBufferProc(userRoutine, theBuffer)            InvokeGXFreeBufferUPP(theBuffer, userRoutine)
  3338. #define Send_GXFreeBuffer(theBuffer) MacSendMessage(0x0000002B, theBuffer)
  3339. #define Forward_GXFreeBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
  3340.  
  3341. typedef CALLBACK_API_C( OSErr , GXCheckStatusProcPtr )(Ptr data, long length, long statusType, gxOwnerSignature owner);
  3342. typedef STACK_UPP_TYPE(GXCheckStatusProcPtr)                     GXCheckStatusUPP;
  3343. #if OPAQUE_UPP_TYPES
  3344.     EXTERN_API(GXCheckStatusUPP)
  3345.     NewGXCheckStatusUPP               (GXCheckStatusProcPtr    userRoutine);
  3346.  
  3347.     EXTERN_API(void)
  3348.     DisposeGXCheckStatusUPP           (GXCheckStatusUPP        userUPP);
  3349.  
  3350.     EXTERN_API(OSErr)
  3351.     InvokeGXCheckStatusUPP           (Ptr                        data,
  3352.                                     long                    length,
  3353.                                     long                    statusType,
  3354.                                     gxOwnerSignature        owner,
  3355.                                     GXCheckStatusUPP        userUPP);
  3356.  
  3357. #else
  3358.     enum { uppGXCheckStatusProcInfo = 0x00003FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3359.     #define NewGXCheckStatusUPP(userRoutine)                         (GXCheckStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCheckStatusProcInfo, GetCurrentArchitecture())
  3360.     #define DisposeGXCheckStatusUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3361.     #define InvokeGXCheckStatusUPP(data, length, statusType, owner, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXCheckStatusProcInfo, (data), (length), (statusType), (owner))
  3362. #endif
  3363. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3364. #define NewGXCheckStatusProc(userRoutine)                         NewGXCheckStatusUPP(userRoutine)
  3365. #define CallGXCheckStatusProc(userRoutine, data, length, statusType, owner) InvokeGXCheckStatusUPP(data, length, statusType, owner, userRoutine)
  3366. #define Send_GXCheckStatus(data, length, statusType, owner) \
  3367.           MacSendMessage(0x0000002C, data, length, statusType, owner)
  3368.  
  3369. #define Forward_GXCheckStatus(data, length, statusType, owner) \
  3370.           ForwardThisMessage((void *) (data), (void *) (length), (void *) (statusType), (void *) (owner))
  3371.  
  3372. typedef CALLBACK_API_C( OSErr , GXGetDeviceStatusProcPtr )(Ptr cmdData, long cmdSize, Ptr responseData, long *responseSize, Str255 termination);
  3373. typedef STACK_UPP_TYPE(GXGetDeviceStatusProcPtr)                 GXGetDeviceStatusUPP;
  3374. #if OPAQUE_UPP_TYPES
  3375.     EXTERN_API(GXGetDeviceStatusUPP)
  3376.     NewGXGetDeviceStatusUPP           (GXGetDeviceStatusProcPtr userRoutine);
  3377.  
  3378.     EXTERN_API(void)
  3379.     DisposeGXGetDeviceStatusUPP       (GXGetDeviceStatusUPP    userUPP);
  3380.  
  3381.     EXTERN_API(OSErr)
  3382.     InvokeGXGetDeviceStatusUPP       (Ptr                        cmdData,
  3383.                                     long                    cmdSize,
  3384.                                     Ptr                        responseData,
  3385.                                     long *                    responseSize,
  3386.                                     Str255                    termination,
  3387.                                     GXGetDeviceStatusUPP    userUPP);
  3388.  
  3389. #else
  3390.     enum { uppGXGetDeviceStatusProcInfo = 0x0000FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3391.     #define NewGXGetDeviceStatusUPP(userRoutine)                     (GXGetDeviceStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDeviceStatusProcInfo, GetCurrentArchitecture())
  3392.     #define DisposeGXGetDeviceStatusUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3393.     #define InvokeGXGetDeviceStatusUPP(cmdData, cmdSize, responseData, responseSize, termination, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXGetDeviceStatusProcInfo, (cmdData), (cmdSize), (responseData), (responseSize), (termination))
  3394. #endif
  3395. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3396. #define NewGXGetDeviceStatusProc(userRoutine)                     NewGXGetDeviceStatusUPP(userRoutine)
  3397. #define CallGXGetDeviceStatusProc(userRoutine, cmdData, cmdSize, responseData, responseSize, termination) InvokeGXGetDeviceStatusUPP(cmdData, cmdSize, responseData, responseSize, termination, userRoutine)
  3398. #define Send_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
  3399.           MacSendMessage(0x0000002D, cmdData, cmdSize, responseData, responseSize, termination)
  3400.  
  3401. #define Forward_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
  3402.           ForwardThisMessage((void *) (cmdData), (void *) (cmdSize), (void *) (responseData), \
  3403.                                       (void *) (responseSize), (void *) (termination))
  3404.  
  3405. typedef CALLBACK_API_C( OSErr , GXFetchTaggedDataProcPtr )(ResType theType, long id, Handle *dataHdl, gxOwnerSignature owner);
  3406. typedef STACK_UPP_TYPE(GXFetchTaggedDataProcPtr)                 GXFetchTaggedDataUPP;
  3407. #if OPAQUE_UPP_TYPES
  3408.     EXTERN_API(GXFetchTaggedDataUPP)
  3409.     NewGXFetchTaggedDataUPP           (GXFetchTaggedDataProcPtr userRoutine);
  3410.  
  3411.     EXTERN_API(void)
  3412.     DisposeGXFetchTaggedDataUPP       (GXFetchTaggedDataUPP    userUPP);
  3413.  
  3414.     EXTERN_API(OSErr)
  3415.     InvokeGXFetchTaggedDataUPP       (ResType                    theType,
  3416.                                     long                    id,
  3417.                                     Handle *                dataHdl,
  3418.                                     gxOwnerSignature        owner,
  3419.                                     GXFetchTaggedDataUPP    userUPP);
  3420.  
  3421. #else
  3422.     enum { uppGXFetchTaggedDataProcInfo = 0x00003FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3423.     #define NewGXFetchTaggedDataUPP(userRoutine)                     (GXFetchTaggedDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFetchTaggedDataProcInfo, GetCurrentArchitecture())
  3424.     #define DisposeGXFetchTaggedDataUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3425.     #define InvokeGXFetchTaggedDataUPP(theType, id, dataHdl, owner, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXFetchTaggedDataProcInfo, (theType), (id), (dataHdl), (owner))
  3426. #endif
  3427. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3428. #define NewGXFetchTaggedDataProc(userRoutine)                     NewGXFetchTaggedDataUPP(userRoutine)
  3429. #define CallGXFetchTaggedDataProc(userRoutine, theType, id, dataHdl, owner) InvokeGXFetchTaggedDataUPP(theType, id, dataHdl, owner, userRoutine)
  3430. #define Send_GXFetchTaggedDriverData(tag, id, pHandle) Send_GXFetchTaggedData(tag, id, pHandle, 'drvr')
  3431. #define Forward_GXFetchTaggedDriverData(tag, id, pHandle) Forward_GXFetchTaggedData(tag, id, pHandle, 'drvr')
  3432. #define Send_GXFetchTaggedData(theType, id, dataHdl, owner) \
  3433.           MacSendMessage(0x0000002E, theType, id, dataHdl, owner)
  3434.  
  3435. #define Forward_GXFetchTaggedData(theType, id, dataHdl, owner) \
  3436.           ForwardThisMessage((void *) (theType), (void *) (id), (void *) (dataHdl), (void *) (owner))
  3437.  
  3438. typedef CALLBACK_API_C( OSErr , GXGetDTPMenuListProcPtr )(MenuHandle menuHdl);
  3439. typedef STACK_UPP_TYPE(GXGetDTPMenuListProcPtr)                 GXGetDTPMenuListUPP;
  3440. #if OPAQUE_UPP_TYPES
  3441.     EXTERN_API(GXGetDTPMenuListUPP)
  3442.     NewGXGetDTPMenuListUPP           (GXGetDTPMenuListProcPtr    userRoutine);
  3443.  
  3444.     EXTERN_API(void)
  3445.     DisposeGXGetDTPMenuListUPP       (GXGetDTPMenuListUPP        userUPP);
  3446.  
  3447.     EXTERN_API(OSErr)
  3448.     InvokeGXGetDTPMenuListUPP       (MenuHandle                menuHdl,
  3449.                                     GXGetDTPMenuListUPP        userUPP);
  3450.  
  3451. #else
  3452.     enum { uppGXGetDTPMenuListProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  3453.     #define NewGXGetDTPMenuListUPP(userRoutine)                     (GXGetDTPMenuListUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDTPMenuListProcInfo, GetCurrentArchitecture())
  3454.     #define DisposeGXGetDTPMenuListUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3455.     #define InvokeGXGetDTPMenuListUPP(menuHdl, userUPP)             (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXGetDTPMenuListProcInfo, (menuHdl))
  3456. #endif
  3457. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3458. #define NewGXGetDTPMenuListProc(userRoutine)                     NewGXGetDTPMenuListUPP(userRoutine)
  3459. #define CallGXGetDTPMenuListProc(userRoutine, menuHdl)            InvokeGXGetDTPMenuListUPP(menuHdl, userRoutine)
  3460. #define    Send_GXGetDTPMenuList(menuHdl) \
  3461.             MacSendMessage(0x0000002F, menuHdl)
  3462.  
  3463. #define    Forward_GXGetDTPMenuList(menuHdl) \
  3464.             ForwardThisMessage((void *) (menuHdl))
  3465.  
  3466. typedef CALLBACK_API_C( OSErr , GXDTPMenuSelectProcPtr )(long id);
  3467. typedef STACK_UPP_TYPE(GXDTPMenuSelectProcPtr)                     GXDTPMenuSelectUPP;
  3468. #if OPAQUE_UPP_TYPES
  3469.     EXTERN_API(GXDTPMenuSelectUPP)
  3470.     NewGXDTPMenuSelectUPP           (GXDTPMenuSelectProcPtr    userRoutine);
  3471.  
  3472.     EXTERN_API(void)
  3473.     DisposeGXDTPMenuSelectUPP       (GXDTPMenuSelectUPP        userUPP);
  3474.  
  3475.     EXTERN_API(OSErr)
  3476.     InvokeGXDTPMenuSelectUPP       (long                    id,
  3477.                                     GXDTPMenuSelectUPP        userUPP);
  3478.  
  3479. #else
  3480.     enum { uppGXDTPMenuSelectProcInfo = 0x000000E1 };                 /* 2_bytes Func(4_bytes) */
  3481.     #define NewGXDTPMenuSelectUPP(userRoutine)                         (GXDTPMenuSelectUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDTPMenuSelectProcInfo, GetCurrentArchitecture())
  3482.     #define DisposeGXDTPMenuSelectUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3483.     #define InvokeGXDTPMenuSelectUPP(id, userUPP)                     (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDTPMenuSelectProcInfo, (id))
  3484. #endif
  3485. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3486. #define NewGXDTPMenuSelectProc(userRoutine)                     NewGXDTPMenuSelectUPP(userRoutine)
  3487. #define CallGXDTPMenuSelectProc(userRoutine, id)                InvokeGXDTPMenuSelectUPP(id, userRoutine)
  3488. #define    Send_GXDTPMenuSelect(id) \
  3489.             MacSendMessage(0x00000030, id)
  3490.  
  3491. #define    Forward_GXDTPMenuSelect(id) \
  3492.             ForwardThisMessage((void *) (id))
  3493.  
  3494. typedef CALLBACK_API_C( OSErr , GXHandleAlertFilterProcPtr )(gxJob theJob, gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *itemHit, Boolean *returnImmed);
  3495. typedef STACK_UPP_TYPE(GXHandleAlertFilterProcPtr)                 GXHandleAlertFilterUPP;
  3496. #if OPAQUE_UPP_TYPES
  3497.     EXTERN_API(GXHandleAlertFilterUPP)
  3498.     NewGXHandleAlertFilterUPP       (GXHandleAlertFilterProcPtr userRoutine);
  3499.  
  3500.     EXTERN_API(void)
  3501.     DisposeGXHandleAlertFilterUPP    (GXHandleAlertFilterUPP userUPP);
  3502.  
  3503.     EXTERN_API(OSErr)
  3504.     InvokeGXHandleAlertFilterUPP    (gxJob                    theJob,
  3505.                                     gxStatusRecord *        pStatusRec,
  3506.                                     DialogPtr                pDialog,
  3507.                                     EventRecord *            theEvent,
  3508.                                     short *                    itemHit,
  3509.                                     Boolean *                returnImmed,
  3510.                                     GXHandleAlertFilterUPP    userUPP);
  3511.  
  3512. #else
  3513.     enum { uppGXHandleAlertFilterProcInfo = 0x0003FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3514.     #define NewGXHandleAlertFilterUPP(userRoutine)                     (GXHandleAlertFilterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertFilterProcInfo, GetCurrentArchitecture())
  3515.     #define DisposeGXHandleAlertFilterUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3516.     #define InvokeGXHandleAlertFilterUPP(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppGXHandleAlertFilterProcInfo, (theJob), (pStatusRec), (pDialog), (theEvent), (itemHit), (returnImmed))
  3517. #endif
  3518. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3519. #define NewGXHandleAlertFilterProc(userRoutine)                 NewGXHandleAlertFilterUPP(userRoutine)
  3520. #define CallGXHandleAlertFilterProc(userRoutine, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) InvokeGXHandleAlertFilterUPP(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed, userRoutine)
  3521. #define    Send_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
  3522.             MacSendMessage(0x00000031, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)
  3523.  
  3524. #define    Forward_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
  3525.             ForwardThisMessage((void *) (theJob), (void *) (pStatusRec), (void *) (pDialog), (void *) (theEvent), \
  3526.                                      (void *) (itemHit), (void *) (returnImmed))
  3527.  
  3528. typedef CALLBACK_API_C( OSErr , GXJobFormatModeQueryProcPtr )(gxQueryType theQuery, void *srcData, void *dstData);
  3529. typedef STACK_UPP_TYPE(GXJobFormatModeQueryProcPtr)             GXJobFormatModeQueryUPP;
  3530. #if OPAQUE_UPP_TYPES
  3531.     EXTERN_API(GXJobFormatModeQueryUPP)
  3532.     NewGXJobFormatModeQueryUPP       (GXJobFormatModeQueryProcPtr userRoutine);
  3533.  
  3534.     EXTERN_API(void)
  3535.     DisposeGXJobFormatModeQueryUPP    (GXJobFormatModeQueryUPP userUPP);
  3536.  
  3537.     EXTERN_API(OSErr)
  3538.     InvokeGXJobFormatModeQueryUPP    (gxQueryType            theQuery,
  3539.                                     void *                    srcData,
  3540.                                     void *                    dstData,
  3541.                                     GXJobFormatModeQueryUPP    userUPP);
  3542.  
  3543. #else
  3544.     enum { uppGXJobFormatModeQueryProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  3545.     #define NewGXJobFormatModeQueryUPP(userRoutine)                 (GXJobFormatModeQueryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobFormatModeQueryProcInfo, GetCurrentArchitecture())
  3546.     #define DisposeGXJobFormatModeQueryUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3547.     #define InvokeGXJobFormatModeQueryUPP(theQuery, srcData, dstData, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXJobFormatModeQueryProcInfo, (theQuery), (srcData), (dstData))
  3548. #endif
  3549. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3550. #define NewGXJobFormatModeQueryProc(userRoutine)                 NewGXJobFormatModeQueryUPP(userRoutine)
  3551. #define CallGXJobFormatModeQueryProc(userRoutine, theQuery, srcData, dstData) InvokeGXJobFormatModeQueryUPP(theQuery, srcData, dstData, userRoutine)
  3552. #define Send_GXJobFormatModeQuery(theQuery, srcData, dstData) \
  3553.           MacSendMessage(0x00000032, theQuery, srcData, dstData)
  3554.  
  3555. #define Forward_GXJobFormatModeQuery(theQuery, srcData, dstData) \
  3556.           ForwardThisMessage((void *) (theQuery), (void *) (srcData), (void *) (dstData))
  3557.  
  3558. typedef CALLBACK_API_C( OSErr , GXWriteStatusToDTPWindowProcPtr )(gxStatusRecord *pStatusRec, gxDisplayRecord *pDisplay);
  3559. typedef STACK_UPP_TYPE(GXWriteStatusToDTPWindowProcPtr)         GXWriteStatusToDTPWindowUPP;
  3560. #if OPAQUE_UPP_TYPES
  3561.     EXTERN_API(GXWriteStatusToDTPWindowUPP)
  3562.     NewGXWriteStatusToDTPWindowUPP    (GXWriteStatusToDTPWindowProcPtr userRoutine);
  3563.  
  3564.     EXTERN_API(void)
  3565.     DisposeGXWriteStatusToDTPWindowUPP    (GXWriteStatusToDTPWindowUPP userUPP);
  3566.  
  3567.     EXTERN_API(OSErr)
  3568.     InvokeGXWriteStatusToDTPWindowUPP    (gxStatusRecord *    pStatusRec,
  3569.                                     gxDisplayRecord *        pDisplay,
  3570.                                     GXWriteStatusToDTPWindowUPP userUPP);
  3571.  
  3572. #else
  3573.     enum { uppGXWriteStatusToDTPWindowProcInfo = 0x000003E1 };         /* 2_bytes Func(4_bytes, 4_bytes) */
  3574.     #define NewGXWriteStatusToDTPWindowUPP(userRoutine)             (GXWriteStatusToDTPWindowUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteStatusToDTPWindowProcInfo, GetCurrentArchitecture())
  3575.     #define DisposeGXWriteStatusToDTPWindowUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  3576.     #define InvokeGXWriteStatusToDTPWindowUPP(pStatusRec, pDisplay, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXWriteStatusToDTPWindowProcInfo, (pStatusRec), (pDisplay))
  3577. #endif
  3578. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3579. #define NewGXWriteStatusToDTPWindowProc(userRoutine)             NewGXWriteStatusToDTPWindowUPP(userRoutine)
  3580. #define CallGXWriteStatusToDTPWindowProc(userRoutine, pStatusRec, pDisplay) InvokeGXWriteStatusToDTPWindowUPP(pStatusRec, pDisplay, userRoutine)
  3581. #define Send_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
  3582.           MacSendMessage(0x00000033, pStatusRec, pDisplay)
  3583.  
  3584. #define Forward_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
  3585.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDisplay))
  3586.  
  3587. typedef CALLBACK_API_C( OSErr , GXInitializeStatusAlertProcPtr )(gxStatusRecord *pStatusRec, DialogPtr *pDialog);
  3588. typedef STACK_UPP_TYPE(GXInitializeStatusAlertProcPtr)             GXInitializeStatusAlertUPP;
  3589. #if OPAQUE_UPP_TYPES
  3590.     EXTERN_API(GXInitializeStatusAlertUPP)
  3591.     NewGXInitializeStatusAlertUPP    (GXInitializeStatusAlertProcPtr userRoutine);
  3592.  
  3593.     EXTERN_API(void)
  3594.     DisposeGXInitializeStatusAlertUPP    (GXInitializeStatusAlertUPP userUPP);
  3595.  
  3596.     EXTERN_API(OSErr)
  3597.     InvokeGXInitializeStatusAlertUPP    (gxStatusRecord *    pStatusRec,
  3598.                                     DialogPtr *                pDialog,
  3599.                                     GXInitializeStatusAlertUPP userUPP);
  3600.  
  3601. #else
  3602.     enum { uppGXInitializeStatusAlertProcInfo = 0x000003E1 };         /* 2_bytes Func(4_bytes, 4_bytes) */
  3603.     #define NewGXInitializeStatusAlertUPP(userRoutine)                 (GXInitializeStatusAlertUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXInitializeStatusAlertProcInfo, GetCurrentArchitecture())
  3604.     #define DisposeGXInitializeStatusAlertUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3605.     #define InvokeGXInitializeStatusAlertUPP(pStatusRec, pDialog, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppGXInitializeStatusAlertProcInfo, (pStatusRec), (pDialog))
  3606. #endif
  3607. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3608. #define NewGXInitializeStatusAlertProc(userRoutine)             NewGXInitializeStatusAlertUPP(userRoutine)
  3609. #define CallGXInitializeStatusAlertProc(userRoutine, pStatusRec, pDialog) InvokeGXInitializeStatusAlertUPP(pStatusRec, pDialog, userRoutine)
  3610. #define Send_GXInitializeStatusAlert(pStatusRec, pDialog) \
  3611.           MacSendMessage(0x00000034, pStatusRec, pDialog)
  3612.  
  3613. #define Forward_GXInitializeStatusAlert(pStatusRec, pDialog) \
  3614.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog))
  3615.  
  3616. typedef CALLBACK_API_C( OSErr , GXHandleAlertStatusProcPtr )(gxStatusRecord *pStatusRec);
  3617. typedef STACK_UPP_TYPE(GXHandleAlertStatusProcPtr)                 GXHandleAlertStatusUPP;
  3618. #if OPAQUE_UPP_TYPES
  3619.     EXTERN_API(GXHandleAlertStatusUPP)
  3620.     NewGXHandleAlertStatusUPP       (GXHandleAlertStatusProcPtr userRoutine);
  3621.  
  3622.     EXTERN_API(void)
  3623.     DisposeGXHandleAlertStatusUPP    (GXHandleAlertStatusUPP userUPP);
  3624.  
  3625.     EXTERN_API(OSErr)
  3626.     InvokeGXHandleAlertStatusUPP    (gxStatusRecord *        pStatusRec,
  3627.                                     GXHandleAlertStatusUPP    userUPP);
  3628.  
  3629. #else
  3630.     enum { uppGXHandleAlertStatusProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  3631.     #define NewGXHandleAlertStatusUPP(userRoutine)                     (GXHandleAlertStatusUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertStatusProcInfo, GetCurrentArchitecture())
  3632.     #define DisposeGXHandleAlertStatusUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3633.     #define InvokeGXHandleAlertStatusUPP(pStatusRec, userUPP)         (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXHandleAlertStatusProcInfo, (pStatusRec))
  3634. #endif
  3635. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3636. #define NewGXHandleAlertStatusProc(userRoutine)                 NewGXHandleAlertStatusUPP(userRoutine)
  3637. #define CallGXHandleAlertStatusProc(userRoutine, pStatusRec)    InvokeGXHandleAlertStatusUPP(pStatusRec, userRoutine)
  3638. #define Send_GXHandleAlertStatus(pStatusRec) \
  3639.           MacSendMessage(0x00000035, pStatusRec)
  3640.  
  3641. #define Forward_GXHandleAlertStatus(pStatusRec) \
  3642.           ForwardThisMessage((void *) (pStatusRec))
  3643.  
  3644. typedef CALLBACK_API_C( OSErr , GXHandleAlertEventProcPtr )(gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *response);
  3645. typedef STACK_UPP_TYPE(GXHandleAlertEventProcPtr)                 GXHandleAlertEventUPP;
  3646. #if OPAQUE_UPP_TYPES
  3647.     EXTERN_API(GXHandleAlertEventUPP)
  3648.     NewGXHandleAlertEventUPP       (GXHandleAlertEventProcPtr userRoutine);
  3649.  
  3650.     EXTERN_API(void)
  3651.     DisposeGXHandleAlertEventUPP    (GXHandleAlertEventUPP    userUPP);
  3652.  
  3653.     EXTERN_API(OSErr)
  3654.     InvokeGXHandleAlertEventUPP       (gxStatusRecord *        pStatusRec,
  3655.                                     DialogPtr                pDialog,
  3656.                                     EventRecord *            theEvent,
  3657.                                     short *                    response,
  3658.                                     GXHandleAlertEventUPP    userUPP);
  3659.  
  3660. #else
  3661.     enum { uppGXHandleAlertEventProcInfo = 0x00003FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3662.     #define NewGXHandleAlertEventUPP(userRoutine)                     (GXHandleAlertEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertEventProcInfo, GetCurrentArchitecture())
  3663.     #define DisposeGXHandleAlertEventUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3664.     #define InvokeGXHandleAlertEventUPP(pStatusRec, pDialog, theEvent, response, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXHandleAlertEventProcInfo, (pStatusRec), (pDialog), (theEvent), (response))
  3665. #endif
  3666. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3667. #define NewGXHandleAlertEventProc(userRoutine)                     NewGXHandleAlertEventUPP(userRoutine)
  3668. #define CallGXHandleAlertEventProc(userRoutine, pStatusRec, pDialog, theEvent, response) InvokeGXHandleAlertEventUPP(pStatusRec, pDialog, theEvent, response, userRoutine)
  3669. #define Send_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
  3670.           MacSendMessage(0x00000036, pStatusRec, pDialog, theEvent, response)
  3671.  
  3672. #define Forward_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
  3673.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog), \
  3674.                                       (void *) (theEvent), (void *) (response))
  3675.  
  3676. typedef CALLBACK_API_C( void , GXCleanupStartJobProcPtr )(void );
  3677. typedef STACK_UPP_TYPE(GXCleanupStartJobProcPtr)                 GXCleanupStartJobUPP;
  3678. #if OPAQUE_UPP_TYPES
  3679.     EXTERN_API(GXCleanupStartJobUPP)
  3680.     NewGXCleanupStartJobUPP           (GXCleanupStartJobProcPtr userRoutine);
  3681.  
  3682.     EXTERN_API(void)
  3683.     DisposeGXCleanupStartJobUPP       (GXCleanupStartJobUPP    userUPP);
  3684.  
  3685.     EXTERN_API(void)
  3686.     InvokeGXCleanupStartJobUPP       (GXCleanupStartJobUPP    userUPP);
  3687.  
  3688. #else
  3689.     enum { uppGXCleanupStartJobProcInfo = 0x00000001 };             /* no_return_value Func() */
  3690.     #define NewGXCleanupStartJobUPP(userRoutine)                     (GXCleanupStartJobUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartJobProcInfo, GetCurrentArchitecture())
  3691.     #define DisposeGXCleanupStartJobUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3692.     #define InvokeGXCleanupStartJobUPP(userUPP)                     CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupStartJobProcInfo)
  3693. #endif
  3694. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3695. #define NewGXCleanupStartJobProc(userRoutine)                     NewGXCleanupStartJobUPP(userRoutine)
  3696. #define CallGXCleanupStartJobProc(userRoutine)                    InvokeGXCleanupStartJobUPP(userRoutine)
  3697. #define Send_GXCleanupStartJob() ((void) MacSendMessage(0x00000037))
  3698. #define Forward_GXCleanupStartJob() ((void) ForwardThisMessage((void *) (0)))
  3699.  
  3700. typedef CALLBACK_API_C( void , GXCleanupStartPageProcPtr )(void );
  3701. typedef STACK_UPP_TYPE(GXCleanupStartPageProcPtr)                 GXCleanupStartPageUPP;
  3702. #if OPAQUE_UPP_TYPES
  3703.     EXTERN_API(GXCleanupStartPageUPP)
  3704.     NewGXCleanupStartPageUPP       (GXCleanupStartPageProcPtr userRoutine);
  3705.  
  3706.     EXTERN_API(void)
  3707.     DisposeGXCleanupStartPageUPP    (GXCleanupStartPageUPP    userUPP);
  3708.  
  3709.     EXTERN_API(void)
  3710.     InvokeGXCleanupStartPageUPP       (GXCleanupStartPageUPP    userUPP);
  3711.  
  3712. #else
  3713.     enum { uppGXCleanupStartPageProcInfo = 0x00000001 };             /* no_return_value Func() */
  3714.     #define NewGXCleanupStartPageUPP(userRoutine)                     (GXCleanupStartPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartPageProcInfo, GetCurrentArchitecture())
  3715.     #define DisposeGXCleanupStartPageUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3716.     #define InvokeGXCleanupStartPageUPP(userUPP)                     CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupStartPageProcInfo)
  3717. #endif
  3718. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3719. #define NewGXCleanupStartPageProc(userRoutine)                     NewGXCleanupStartPageUPP(userRoutine)
  3720. #define CallGXCleanupStartPageProc(userRoutine)                    InvokeGXCleanupStartPageUPP(userRoutine)
  3721. #define Send_GXCleanupStartPage() ((void) MacSendMessage(0x00000038))
  3722. #define Forward_GXCleanupStartPage() ((void) ForwardThisMessage((void *) (0)))
  3723.  
  3724. typedef CALLBACK_API_C( void , GXCleanupOpenConnectionProcPtr )(void );
  3725. typedef STACK_UPP_TYPE(GXCleanupOpenConnectionProcPtr)             GXCleanupOpenConnectionUPP;
  3726. #if OPAQUE_UPP_TYPES
  3727.     EXTERN_API(GXCleanupOpenConnectionUPP)
  3728.     NewGXCleanupOpenConnectionUPP    (GXCleanupOpenConnectionProcPtr userRoutine);
  3729.  
  3730.     EXTERN_API(void)
  3731.     DisposeGXCleanupOpenConnectionUPP    (GXCleanupOpenConnectionUPP userUPP);
  3732.  
  3733.     EXTERN_API(void)
  3734.     InvokeGXCleanupOpenConnectionUPP    (GXCleanupOpenConnectionUPP userUPP);
  3735.  
  3736. #else
  3737.     enum { uppGXCleanupOpenConnectionProcInfo = 0x00000001 };         /* no_return_value Func() */
  3738.     #define NewGXCleanupOpenConnectionUPP(userRoutine)                 (GXCleanupOpenConnectionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupOpenConnectionProcInfo, GetCurrentArchitecture())
  3739.     #define DisposeGXCleanupOpenConnectionUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3740.     #define InvokeGXCleanupOpenConnectionUPP(userUPP)                 CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupOpenConnectionProcInfo)
  3741. #endif
  3742. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3743. #define NewGXCleanupOpenConnectionProc(userRoutine)             NewGXCleanupOpenConnectionUPP(userRoutine)
  3744. #define CallGXCleanupOpenConnectionProc(userRoutine)            InvokeGXCleanupOpenConnectionUPP(userRoutine)
  3745. #define Send_GXCleanupOpenConnection() ((void) MacSendMessage(0x00000039))
  3746. #define Forward_GXCleanupOpenConnection() ((void) ForwardThisMessage((void *) (0)))
  3747.  
  3748. typedef CALLBACK_API_C( void , GXCleanupStartSendPageProcPtr )(void );
  3749. typedef STACK_UPP_TYPE(GXCleanupStartSendPageProcPtr)             GXCleanupStartSendPageUPP;
  3750. #if OPAQUE_UPP_TYPES
  3751.     EXTERN_API(GXCleanupStartSendPageUPP)
  3752.     NewGXCleanupStartSendPageUPP    (GXCleanupStartSendPageProcPtr userRoutine);
  3753.  
  3754.     EXTERN_API(void)
  3755.     DisposeGXCleanupStartSendPageUPP    (GXCleanupStartSendPageUPP userUPP);
  3756.  
  3757.     EXTERN_API(void)
  3758.     InvokeGXCleanupStartSendPageUPP    (GXCleanupStartSendPageUPP userUPP);
  3759.  
  3760. #else
  3761.     enum { uppGXCleanupStartSendPageProcInfo = 0x00000001 };         /* no_return_value Func() */
  3762.     #define NewGXCleanupStartSendPageUPP(userRoutine)                 (GXCleanupStartSendPageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartSendPageProcInfo, GetCurrentArchitecture())
  3763.     #define DisposeGXCleanupStartSendPageUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3764.     #define InvokeGXCleanupStartSendPageUPP(userUPP)                 CALL_ZERO_PARAMETER_UPP((userUPP), uppGXCleanupStartSendPageProcInfo)
  3765. #endif
  3766. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3767. #define NewGXCleanupStartSendPageProc(userRoutine)                 NewGXCleanupStartSendPageUPP(userRoutine)
  3768. #define CallGXCleanupStartSendPageProc(userRoutine)                InvokeGXCleanupStartSendPageUPP(userRoutine)
  3769. #define Send_GXCleanupStartSendPage()  ((void) MacSendMessage(0x0000003A))
  3770. #define Forward_GXCleanupStartSendPage() ((void) ForwardThisMessage((void *) (0)))
  3771.  
  3772. typedef CALLBACK_API_C( OSErr , GXDefaultDesktopPrinterProcPtr )(Str31 dtpName);
  3773. typedef STACK_UPP_TYPE(GXDefaultDesktopPrinterProcPtr)             GXDefaultDesktopPrinterUPP;
  3774. #if OPAQUE_UPP_TYPES
  3775.     EXTERN_API(GXDefaultDesktopPrinterUPP)
  3776.     NewGXDefaultDesktopPrinterUPP    (GXDefaultDesktopPrinterProcPtr userRoutine);
  3777.  
  3778.     EXTERN_API(void)
  3779.     DisposeGXDefaultDesktopPrinterUPP    (GXDefaultDesktopPrinterUPP userUPP);
  3780.  
  3781.     EXTERN_API(OSErr)
  3782.     InvokeGXDefaultDesktopPrinterUPP    (Str31                dtpName,
  3783.                                     GXDefaultDesktopPrinterUPP userUPP);
  3784.  
  3785. #else
  3786.     enum { uppGXDefaultDesktopPrinterProcInfo = 0x000000E1 };         /* 2_bytes Func(4_bytes) */
  3787.     #define NewGXDefaultDesktopPrinterUPP(userRoutine)                 (GXDefaultDesktopPrinterUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultDesktopPrinterProcInfo, GetCurrentArchitecture())
  3788.     #define DisposeGXDefaultDesktopPrinterUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3789.     #define InvokeGXDefaultDesktopPrinterUPP(dtpName, userUPP)         (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXDefaultDesktopPrinterProcInfo, (dtpName))
  3790. #endif
  3791. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3792. #define NewGXDefaultDesktopPrinterProc(userRoutine)             NewGXDefaultDesktopPrinterUPP(userRoutine)
  3793. #define CallGXDefaultDesktopPrinterProc(userRoutine, dtpName)    InvokeGXDefaultDesktopPrinterUPP(dtpName, userRoutine)
  3794. #define Send_GXDefaultDesktopPrinter(dtpName) MacSendMessage(0x0000003B, dtpName)
  3795. #define Forward_GXDefaultDesktopPrinter(dtpName) ForwardThisMessage((void *) (dtpName))
  3796.  
  3797. typedef CALLBACK_API_C( OSErr , GXCaptureOutputDeviceProcPtr )(Boolean capture);
  3798. typedef STACK_UPP_TYPE(GXCaptureOutputDeviceProcPtr)             GXCaptureOutputDeviceUPP;
  3799. #if OPAQUE_UPP_TYPES
  3800.     EXTERN_API(GXCaptureOutputDeviceUPP)
  3801.     NewGXCaptureOutputDeviceUPP       (GXCaptureOutputDeviceProcPtr userRoutine);
  3802.  
  3803.     EXTERN_API(void)
  3804.     DisposeGXCaptureOutputDeviceUPP    (GXCaptureOutputDeviceUPP userUPP);
  3805.  
  3806.     EXTERN_API(OSErr)
  3807.     InvokeGXCaptureOutputDeviceUPP    (Boolean                capture,
  3808.                                     GXCaptureOutputDeviceUPP userUPP);
  3809.  
  3810. #else
  3811.     enum { uppGXCaptureOutputDeviceProcInfo = 0x00000061 };         /* 2_bytes Func(1_byte) */
  3812.     #define NewGXCaptureOutputDeviceUPP(userRoutine)                 (GXCaptureOutputDeviceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCaptureOutputDeviceProcInfo, GetCurrentArchitecture())
  3813.     #define DisposeGXCaptureOutputDeviceUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3814.     #define InvokeGXCaptureOutputDeviceUPP(capture, userUPP)         (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXCaptureOutputDeviceProcInfo, (capture))
  3815. #endif
  3816. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3817. #define NewGXCaptureOutputDeviceProc(userRoutine)                 NewGXCaptureOutputDeviceUPP(userRoutine)
  3818. #define CallGXCaptureOutputDeviceProc(userRoutine, capture)        InvokeGXCaptureOutputDeviceUPP(capture, userRoutine)
  3819. #define Send_GXCaptureOutputDevice(capture) MacSendMessage(0x0000003C, capture)
  3820. #define Forward_GXCaptureOutputDevice(capture) ForwardThisMessage((void *) (capture))
  3821.  
  3822. typedef CALLBACK_API_C( OSErr , GXOpenConnectionRetryProcPtr )(ResType theType, void *aVoid, Boolean *retryopenPtr, OSErr anErr);
  3823. typedef STACK_UPP_TYPE(GXOpenConnectionRetryProcPtr)             GXOpenConnectionRetryUPP;
  3824. #if OPAQUE_UPP_TYPES
  3825.     EXTERN_API(GXOpenConnectionRetryUPP)
  3826.     NewGXOpenConnectionRetryUPP       (GXOpenConnectionRetryProcPtr userRoutine);
  3827.  
  3828.     EXTERN_API(void)
  3829.     DisposeGXOpenConnectionRetryUPP    (GXOpenConnectionRetryUPP userUPP);
  3830.  
  3831.     EXTERN_API(OSErr)
  3832.     InvokeGXOpenConnectionRetryUPP    (ResType                theType,
  3833.                                     void *                    aVoid,
  3834.                                     Boolean *                retryopenPtr,
  3835.                                     OSErr                    anErr,
  3836.                                     GXOpenConnectionRetryUPP userUPP);
  3837.  
  3838. #else
  3839.     enum { uppGXOpenConnectionRetryProcInfo = 0x00002FE1 };         /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  3840.     #define NewGXOpenConnectionRetryUPP(userRoutine)                 (GXOpenConnectionRetryUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionRetryProcInfo, GetCurrentArchitecture())
  3841.     #define DisposeGXOpenConnectionRetryUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3842.     #define InvokeGXOpenConnectionRetryUPP(theType, aVoid, retryopenPtr, anErr, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppGXOpenConnectionRetryProcInfo, (theType), (aVoid), (retryopenPtr), (anErr))
  3843. #endif
  3844. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3845. #define NewGXOpenConnectionRetryProc(userRoutine)                 NewGXOpenConnectionRetryUPP(userRoutine)
  3846. #define CallGXOpenConnectionRetryProc(userRoutine, theType, aVoid, retryopenPtr, anErr) InvokeGXOpenConnectionRetryUPP(theType, aVoid, retryopenPtr, anErr, userRoutine)
  3847. #define Send_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
  3848.           MacSendMessage(0x0000003D, theType, aVoid, retryopenPtr, anErr)
  3849.  
  3850. #define Forward_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
  3851.           ForwardThisMessage((void *) (theType), (void *) (aVoid), (void *) (retryopenPtr), (void *) (anErr))
  3852.  
  3853. typedef CALLBACK_API_C( OSErr , GXExamineSpoolFileProcPtr )(gxSpoolFile theSpoolFile);
  3854. typedef STACK_UPP_TYPE(GXExamineSpoolFileProcPtr)                 GXExamineSpoolFileUPP;
  3855. #if OPAQUE_UPP_TYPES
  3856.     EXTERN_API(GXExamineSpoolFileUPP)
  3857.     NewGXExamineSpoolFileUPP       (GXExamineSpoolFileProcPtr userRoutine);
  3858.  
  3859.     EXTERN_API(void)
  3860.     DisposeGXExamineSpoolFileUPP    (GXExamineSpoolFileUPP    userUPP);
  3861.  
  3862.     EXTERN_API(OSErr)
  3863.     InvokeGXExamineSpoolFileUPP       (gxSpoolFile                theSpoolFile,
  3864.                                     GXExamineSpoolFileUPP    userUPP);
  3865.  
  3866. #else
  3867.     enum { uppGXExamineSpoolFileProcInfo = 0x000000E1 };             /* 2_bytes Func(4_bytes) */
  3868.     #define NewGXExamineSpoolFileUPP(userRoutine)                     (GXExamineSpoolFileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXExamineSpoolFileProcInfo, GetCurrentArchitecture())
  3869.     #define DisposeGXExamineSpoolFileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3870.     #define InvokeGXExamineSpoolFileUPP(theSpoolFile, userUPP)         (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXExamineSpoolFileProcInfo, (theSpoolFile))
  3871. #endif
  3872. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3873. #define NewGXExamineSpoolFileProc(userRoutine)                     NewGXExamineSpoolFileUPP(userRoutine)
  3874. #define CallGXExamineSpoolFileProc(userRoutine, theSpoolFile)    InvokeGXExamineSpoolFileUPP(theSpoolFile, userRoutine)
  3875. #define Send_GXExamineSpoolFile(theSpoolFile) MacSendMessage(0x0000003E, theSpoolFile)
  3876. #define Forward_GXExamineSpoolFile(theSpoolFile) ForwardThisMessage((void *) (theSpoolFile))
  3877.  
  3878. typedef CALLBACK_API_C( OSErr , GXFinishSendPlaneProcPtr )(void );
  3879. typedef STACK_UPP_TYPE(GXFinishSendPlaneProcPtr)                 GXFinishSendPlaneUPP;
  3880. #if OPAQUE_UPP_TYPES
  3881.     EXTERN_API(GXFinishSendPlaneUPP)
  3882.     NewGXFinishSendPlaneUPP           (GXFinishSendPlaneProcPtr userRoutine);
  3883.  
  3884.     EXTERN_API(void)
  3885.     DisposeGXFinishSendPlaneUPP       (GXFinishSendPlaneUPP    userUPP);
  3886.  
  3887.     EXTERN_API(OSErr)
  3888.     InvokeGXFinishSendPlaneUPP       (GXFinishSendPlaneUPP    userUPP);
  3889.  
  3890. #else
  3891.     enum { uppGXFinishSendPlaneProcInfo = 0x00000021 };             /* 2_bytes Func() */
  3892.     #define NewGXFinishSendPlaneUPP(userRoutine)                     (GXFinishSendPlaneUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPlaneProcInfo, GetCurrentArchitecture())
  3893.     #define DisposeGXFinishSendPlaneUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3894.     #define InvokeGXFinishSendPlaneUPP(userUPP)                     (OSErr)CALL_ZERO_PARAMETER_UPP((userUPP), uppGXFinishSendPlaneProcInfo)
  3895. #endif
  3896. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3897. #define NewGXFinishSendPlaneProc(userRoutine)                     NewGXFinishSendPlaneUPP(userRoutine)
  3898. #define CallGXFinishSendPlaneProc(userRoutine)                    InvokeGXFinishSendPlaneUPP(userRoutine)
  3899. #define Send_GXFinishSendPlane() MacSendMessage(0x0000003F)
  3900. #define Forward_GXFinishSendPlane() ForwardThisMessage((void *) (0))
  3901.  
  3902. typedef CALLBACK_API_C( OSErr , GXDoesPaperFitProcPtr )(gxTrayIndex whichTray, gxPaperType paper, Boolean *fits);
  3903. typedef STACK_UPP_TYPE(GXDoesPaperFitProcPtr)                     GXDoesPaperFitUPP;
  3904. #if OPAQUE_UPP_TYPES
  3905.     EXTERN_API(GXDoesPaperFitUPP)
  3906.     NewGXDoesPaperFitUPP           (GXDoesPaperFitProcPtr    userRoutine);
  3907.  
  3908.     EXTERN_API(void)
  3909.     DisposeGXDoesPaperFitUPP       (GXDoesPaperFitUPP        userUPP);
  3910.  
  3911.     EXTERN_API(OSErr)
  3912.     InvokeGXDoesPaperFitUPP           (gxTrayIndex                whichTray,
  3913.                                     gxPaperType                paper,
  3914.                                     Boolean *                fits,
  3915.                                     GXDoesPaperFitUPP        userUPP);
  3916.  
  3917. #else
  3918.     enum { uppGXDoesPaperFitProcInfo = 0x00000FE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  3919.     #define NewGXDoesPaperFitUPP(userRoutine)                         (GXDoesPaperFitUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDoesPaperFitProcInfo, GetCurrentArchitecture())
  3920.     #define DisposeGXDoesPaperFitUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  3921.     #define InvokeGXDoesPaperFitUPP(whichTray, paper, fits, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXDoesPaperFitProcInfo, (whichTray), (paper), (fits))
  3922. #endif
  3923. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3924. #define NewGXDoesPaperFitProc(userRoutine)                         NewGXDoesPaperFitUPP(userRoutine)
  3925. #define CallGXDoesPaperFitProc(userRoutine, whichTray, paper, fits) InvokeGXDoesPaperFitUPP(whichTray, paper, fits, userRoutine)
  3926. #define Send_GXDoesPaperFit(whichTray, paper, fits) \
  3927.           MacSendMessage(0x00000040, whichTray, paper, fits)
  3928.  
  3929. #define Forward_GXDoesPaperFit(whichTray, paper, fits) \
  3930.           ForwardThisMessage((void *) (whichTray), (void *) (paper), (void *) (fits))
  3931.  
  3932. typedef CALLBACK_API_C( OSErr , GXChooserMessageProcPtr )(long message, long caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2);
  3933. typedef STACK_UPP_TYPE(GXChooserMessageProcPtr)                 GXChooserMessageUPP;
  3934. #if OPAQUE_UPP_TYPES
  3935.     EXTERN_API(GXChooserMessageUPP)
  3936.     NewGXChooserMessageUPP           (GXChooserMessageProcPtr    userRoutine);
  3937.  
  3938.     EXTERN_API(void)
  3939.     DisposeGXChooserMessageUPP       (GXChooserMessageUPP        userUPP);
  3940.  
  3941.     EXTERN_API(OSErr)
  3942.     InvokeGXChooserMessageUPP       (long                    message,
  3943.                                     long                    caller,
  3944.                                     StringPtr                objName,
  3945.                                     StringPtr                zoneName,
  3946.                                     ListHandle                theList,
  3947.                                     long                    p2,
  3948.                                     GXChooserMessageUPP        userUPP);
  3949.  
  3950. #else
  3951.     enum { uppGXChooserMessageProcInfo = 0x0003FFE1 };                 /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3952.     #define NewGXChooserMessageUPP(userRoutine)                     (GXChooserMessageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXChooserMessageProcInfo, GetCurrentArchitecture())
  3953.     #define DisposeGXChooserMessageUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  3954.     #define InvokeGXChooserMessageUPP(message, caller, objName, zoneName, theList, p2, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppGXChooserMessageProcInfo, (message), (caller), (objName), (zoneName), (theList), (p2))
  3955. #endif
  3956. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3957. #define NewGXChooserMessageProc(userRoutine)                     NewGXChooserMessageUPP(userRoutine)
  3958. #define CallGXChooserMessageProc(userRoutine, message, caller, objName, zoneName, theList, p2) InvokeGXChooserMessageUPP(message, caller, objName, zoneName, theList, p2, userRoutine)
  3959. #define Send_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
  3960.           MacSendMessage(0x00000041, message, caller, objName, zoneName, theList, p2)
  3961.  
  3962. #define Forward_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
  3963.           ForwardThisMessage((void *) (message), (void *) (caller), (void *) (objName), \
  3964.                                       (void *) (zoneName), (void *) (theList), (void *) (p2))
  3965.  
  3966. typedef CALLBACK_API_C( OSErr , GXFindPrinterProfileProcPtr )(gxPrinter thePrinter, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
  3967. typedef STACK_UPP_TYPE(GXFindPrinterProfileProcPtr)             GXFindPrinterProfileUPP;
  3968. #if OPAQUE_UPP_TYPES
  3969.     EXTERN_API(GXFindPrinterProfileUPP)
  3970.     NewGXFindPrinterProfileUPP       (GXFindPrinterProfileProcPtr userRoutine);
  3971.  
  3972.     EXTERN_API(void)
  3973.     DisposeGXFindPrinterProfileUPP    (GXFindPrinterProfileUPP userUPP);
  3974.  
  3975.     EXTERN_API(OSErr)
  3976.     InvokeGXFindPrinterProfileUPP    (gxPrinter                thePrinter,
  3977.                                     void *                    searchData,
  3978.                                     long                    index,
  3979.                                     gxColorProfile *        returnedProfile,
  3980.                                     long *                    numProfiles,
  3981.                                     GXFindPrinterProfileUPP    userUPP);
  3982.  
  3983. #else
  3984.     enum { uppGXFindPrinterProfileProcInfo = 0x0000FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  3985.     #define NewGXFindPrinterProfileUPP(userRoutine)                 (GXFindPrinterProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindPrinterProfileProcInfo, GetCurrentArchitecture())
  3986.     #define DisposeGXFindPrinterProfileUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  3987.     #define InvokeGXFindPrinterProfileUPP(thePrinter, searchData, index, returnedProfile, numProfiles, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXFindPrinterProfileProcInfo, (thePrinter), (searchData), (index), (returnedProfile), (numProfiles))
  3988. #endif
  3989. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  3990. #define NewGXFindPrinterProfileProc(userRoutine)                 NewGXFindPrinterProfileUPP(userRoutine)
  3991. #define CallGXFindPrinterProfileProc(userRoutine, thePrinter, searchData, index, returnedProfile, numProfiles) InvokeGXFindPrinterProfileUPP(thePrinter, searchData, index, returnedProfile, numProfiles, userRoutine)
  3992. #define Send_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
  3993.           MacSendMessage(0x00000042, thePrinter, searchData, index, returnedProfile, numProfiles)
  3994.  
  3995. #define Forward_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
  3996.           ForwardThisMessage((void *) (thePrinter), (void *) (searchData), (void *) (index), (void *) (returnedProfile), (void *) (numProfiles))
  3997.  
  3998. typedef CALLBACK_API_C( OSErr , GXFindFormatProfileProcPtr )(gxFormat theFormat, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
  3999. typedef STACK_UPP_TYPE(GXFindFormatProfileProcPtr)                 GXFindFormatProfileUPP;
  4000. #if OPAQUE_UPP_TYPES
  4001.     EXTERN_API(GXFindFormatProfileUPP)
  4002.     NewGXFindFormatProfileUPP       (GXFindFormatProfileProcPtr userRoutine);
  4003.  
  4004.     EXTERN_API(void)
  4005.     DisposeGXFindFormatProfileUPP    (GXFindFormatProfileUPP userUPP);
  4006.  
  4007.     EXTERN_API(OSErr)
  4008.     InvokeGXFindFormatProfileUPP    (gxFormat                theFormat,
  4009.                                     void *                    searchData,
  4010.                                     long                    index,
  4011.                                     gxColorProfile *        returnedProfile,
  4012.                                     long *                    numProfiles,
  4013.                                     GXFindFormatProfileUPP    userUPP);
  4014.  
  4015. #else
  4016.     enum { uppGXFindFormatProfileProcInfo = 0x0000FFE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  4017.     #define NewGXFindFormatProfileUPP(userRoutine)                     (GXFindFormatProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindFormatProfileProcInfo, GetCurrentArchitecture())
  4018.     #define DisposeGXFindFormatProfileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4019.     #define InvokeGXFindFormatProfileUPP(theFormat, searchData, index, returnedProfile, numProfiles, userUPP)  (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppGXFindFormatProfileProcInfo, (theFormat), (searchData), (index), (returnedProfile), (numProfiles))
  4020. #endif
  4021. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  4022. #define NewGXFindFormatProfileProc(userRoutine)                 NewGXFindFormatProfileUPP(userRoutine)
  4023. #define CallGXFindFormatProfileProc(userRoutine, theFormat, searchData, index, returnedProfile, numProfiles) InvokeGXFindFormatProfileUPP(theFormat, searchData, index, returnedProfile, numProfiles, userRoutine)
  4024. #define Send_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
  4025.           MacSendMessage(0x00000043, theFormat, searchData, index, returnedProfile, numProfiles)
  4026.  
  4027. #define Forward_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
  4028.           ForwardThisMessage((void *) (theFormat), (void *) (searchData), (void *) (index), (void *) (returnedProfile), \
  4029.                                       (void *) (numProfiles))
  4030.  
  4031. typedef CALLBACK_API_C( OSErr , GXSetPrinterProfileProcPtr )(gxPrinter thePrinter, gxColorProfile oldProfile, gxColorProfile newProfile);
  4032. typedef STACK_UPP_TYPE(GXSetPrinterProfileProcPtr)                 GXSetPrinterProfileUPP;
  4033. #if OPAQUE_UPP_TYPES
  4034.     EXTERN_API(GXSetPrinterProfileUPP)
  4035.     NewGXSetPrinterProfileUPP       (GXSetPrinterProfileProcPtr userRoutine);
  4036.  
  4037.     EXTERN_API(void)
  4038.     DisposeGXSetPrinterProfileUPP    (GXSetPrinterProfileUPP userUPP);
  4039.  
  4040.     EXTERN_API(OSErr)
  4041.     InvokeGXSetPrinterProfileUPP    (gxPrinter                thePrinter,
  4042.                                     gxColorProfile            oldProfile,
  4043.                                     gxColorProfile            newProfile,
  4044.                                     GXSetPrinterProfileUPP    userUPP);
  4045.  
  4046. #else
  4047.     enum { uppGXSetPrinterProfileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  4048.     #define NewGXSetPrinterProfileUPP(userRoutine)                     (GXSetPrinterProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetPrinterProfileProcInfo, GetCurrentArchitecture())
  4049.     #define DisposeGXSetPrinterProfileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4050.     #define InvokeGXSetPrinterProfileUPP(thePrinter, oldProfile, newProfile, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSetPrinterProfileProcInfo, (thePrinter), (oldProfile), (newProfile))
  4051. #endif
  4052. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  4053. #define NewGXSetPrinterProfileProc(userRoutine)                 NewGXSetPrinterProfileUPP(userRoutine)
  4054. #define CallGXSetPrinterProfileProc(userRoutine, thePrinter, oldProfile, newProfile) InvokeGXSetPrinterProfileUPP(thePrinter, oldProfile, newProfile, userRoutine)
  4055. #define Send_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
  4056.           MacSendMessage(0x00000044, thePrinter, oldProfile, newProfile)
  4057.  
  4058. #define Forward_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
  4059.           ForwardThisMessage((void *) (thePrinter), (void *) (oldProfile), (void *) (newProfile))
  4060.  
  4061. typedef CALLBACK_API_C( OSErr , GXSetFormatProfileProcPtr )(gxFormat theFormat, gxColorProfile oldProfile, gxColorProfile newProfile);
  4062. typedef STACK_UPP_TYPE(GXSetFormatProfileProcPtr)                 GXSetFormatProfileUPP;
  4063. #if OPAQUE_UPP_TYPES
  4064.     EXTERN_API(GXSetFormatProfileUPP)
  4065.     NewGXSetFormatProfileUPP       (GXSetFormatProfileProcPtr userRoutine);
  4066.  
  4067.     EXTERN_API(void)
  4068.     DisposeGXSetFormatProfileUPP    (GXSetFormatProfileUPP    userUPP);
  4069.  
  4070.     EXTERN_API(OSErr)
  4071.     InvokeGXSetFormatProfileUPP       (gxFormat                theFormat,
  4072.                                     gxColorProfile            oldProfile,
  4073.                                     gxColorProfile            newProfile,
  4074.                                     GXSetFormatProfileUPP    userUPP);
  4075.  
  4076. #else
  4077.     enum { uppGXSetFormatProfileProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  4078.     #define NewGXSetFormatProfileUPP(userRoutine)                     (GXSetFormatProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetFormatProfileProcInfo, GetCurrentArchitecture())
  4079.     #define DisposeGXSetFormatProfileUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  4080.     #define InvokeGXSetFormatProfileUPP(theFormat, oldProfile, newProfile, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSetFormatProfileProcInfo, (theFormat), (oldProfile), (newProfile))
  4081. #endif
  4082. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  4083. #define NewGXSetFormatProfileProc(userRoutine)                     NewGXSetFormatProfileUPP(userRoutine)
  4084. #define CallGXSetFormatProfileProc(userRoutine, theFormat, oldProfile, newProfile) InvokeGXSetFormatProfileUPP(theFormat, oldProfile, newProfile, userRoutine)
  4085. #define Send_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
  4086.           MacSendMessage(0x00000045, theFormat, oldProfile, newProfile)
  4087.  
  4088. #define Forward_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
  4089.           ForwardThisMessage((void *) (theFormat), (void *) (oldProfile), (void *) (newProfile))
  4090.  
  4091. typedef CALLBACK_API_C( OSErr , GXHandleAltDestinationProcPtr )(Boolean *userCancels);
  4092. typedef STACK_UPP_TYPE(GXHandleAltDestinationProcPtr)             GXHandleAltDestinationUPP;
  4093. #if OPAQUE_UPP_TYPES
  4094.     EXTERN_API(GXHandleAltDestinationUPP)
  4095.     NewGXHandleAltDestinationUPP    (GXHandleAltDestinationProcPtr userRoutine);
  4096.  
  4097.     EXTERN_API(void)
  4098.     DisposeGXHandleAltDestinationUPP    (GXHandleAltDestinationUPP userUPP);
  4099.  
  4100.     EXTERN_API(OSErr)
  4101.     InvokeGXHandleAltDestinationUPP    (Boolean *            userCancels,
  4102.                                     GXHandleAltDestinationUPP userUPP);
  4103.  
  4104. #else
  4105.     enum { uppGXHandleAltDestinationProcInfo = 0x000000E1 };         /* 2_bytes Func(4_bytes) */
  4106.     #define NewGXHandleAltDestinationUPP(userRoutine)                 (GXHandleAltDestinationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAltDestinationProcInfo, GetCurrentArchitecture())
  4107.     #define DisposeGXHandleAltDestinationUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  4108.     #define InvokeGXHandleAltDestinationUPP(userCancels, userUPP)     (OSErr)CALL_ONE_PARAMETER_UPP((userUPP), uppGXHandleAltDestinationProcInfo, (userCancels))
  4109. #endif
  4110. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  4111. #define NewGXHandleAltDestinationProc(userRoutine)                 NewGXHandleAltDestinationUPP(userRoutine)
  4112. #define CallGXHandleAltDestinationProc(userRoutine, userCancels) InvokeGXHandleAltDestinationUPP(userCancels, userRoutine)
  4113. #define Send_GXHandleAltDestination(userCancels) MacSendMessage(0x00000046, userCancels)
  4114. #define Forward_GXHandleAltDestination(userCancels) ForwardThisMessage((void *) (userCancels))
  4115.  
  4116. typedef CALLBACK_API_C( OSErr , GXSetupPageImageDataProcPtr )(gxFormat theFormat, gxShape thePage, void *imageData);
  4117. typedef STACK_UPP_TYPE(GXSetupPageImageDataProcPtr)             GXSetupPageImageDataUPP;
  4118. #if OPAQUE_UPP_TYPES
  4119.     EXTERN_API(GXSetupPageImageDataUPP)
  4120.     NewGXSetupPageImageDataUPP       (GXSetupPageImageDataProcPtr userRoutine);
  4121.  
  4122.     EXTERN_API(void)
  4123.     DisposeGXSetupPageImageDataUPP    (GXSetupPageImageDataUPP userUPP);
  4124.  
  4125.     EXTERN_API(OSErr)
  4126.     InvokeGXSetupPageImageDataUPP    (gxFormat                theFormat,
  4127.                                     gxShape                    thePage,
  4128.                                     void *                    imageData,
  4129.                                     GXSetupPageImageDataUPP    userUPP);
  4130.  
  4131. #else
  4132.     enum { uppGXSetupPageImageDataProcInfo = 0x00000FE1 };             /* 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  4133.     #define NewGXSetupPageImageDataUPP(userRoutine)                 (GXSetupPageImageDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupPageImageDataProcInfo, GetCurrentArchitecture())
  4134.     #define DisposeGXSetupPageImageDataUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  4135.     #define InvokeGXSetupPageImageDataUPP(theFormat, thePage, imageData, userUPP)  (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppGXSetupPageImageDataProcInfo, (theFormat), (thePage), (imageData))
  4136. #endif
  4137. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  4138. #define NewGXSetupPageImageDataProc(userRoutine)                 NewGXSetupPageImageDataUPP(userRoutine)
  4139. #define CallGXSetupPageImageDataProc(userRoutine, theFormat, thePage, imageData) InvokeGXSetupPageImageDataUPP(theFormat, thePage, imageData, userRoutine)
  4140. #define Send_GXSetupPageImageData(theFormat, thePage, imageData) \
  4141.           MacSendMessage(0x00000047, theFormat, thePage, imageData)
  4142.  
  4143. #define Forward_GXSetupPageImageData(theFormat, thePage, imageData) \
  4144.           ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (imageData))
  4145. /*******************************************************************
  4146.                 Start of old "GXPrintingErrors.h/a/p" interface file.
  4147.         ********************************************************************/
  4148. enum {
  4149.     gxPrintingResultBase        = -510                            /*First QuickDraw GX printing error code.*/
  4150. };
  4151.  
  4152. /*RESULT CODES FOR QUICKDRAW GX PRINTING OPERATIONS*/
  4153. enum {
  4154.     gxAioTimeout                = (gxPrintingResultBase),        /*-510 : Timeout condition occurred during operation*/
  4155.     gxAioBadRqstState            = (gxPrintingResultBase - 1),    /*-511 : Async I/O request in invalid state for operation*/
  4156.     gxAioBadConn                = (gxPrintingResultBase - 2),    /*-512 : Invalid Async I/O connection refnum*/
  4157.     gxAioInvalidXfer            = (gxPrintingResultBase - 3),    /*-513 : Read data transfer structure contained bad values*/
  4158.     gxAioNoRqstBlks                = (gxPrintingResultBase - 4),    /*-514 : No available request blocks to process request*/
  4159.     gxAioNoDataXfer                = (gxPrintingResultBase - 5),    /*-515 : Data transfer structure pointer not specified*/
  4160.     gxAioTooManyAutos            = (gxPrintingResultBase - 6),    /*-516 : Auto status request already active*/
  4161.     gxAioNoAutoStat                = (gxPrintingResultBase - 7),    /*-517 : Connection not configured for auto status*/
  4162.     gxAioBadRqstID                = (gxPrintingResultBase - 8),    /*-518 : Invalid I/O request identifier*/
  4163.     gxAioCantKill                = (gxPrintingResultBase - 9),    /*-519 : Comm. protocol doesn't support I/O term*/
  4164.     gxAioAlreadyExists            = (gxPrintingResultBase - 10),    /*-520 : Protocol spec. data already specified*/
  4165.     gxAioCantFind                = (gxPrintingResultBase - 11),    /*-521 : Protocol spec. data does not exist*/
  4166.     gxAioDeviceDisconn            = (gxPrintingResultBase - 12),    /*-522 : Machine disconnected from printer*/
  4167.     gxAioNotImplemented            = (gxPrintingResultBase - 13),    /*-523 : Function not implemented*/
  4168.     gxAioOpenPending            = (gxPrintingResultBase - 14),    /*-524 : Opening a connection for protocol, but another open pending*/
  4169.     gxAioNoProtocolData            = (gxPrintingResultBase - 15),    /*-525 : No protocol specific data specified in request*/
  4170.     gxAioRqstKilled                = (gxPrintingResultBase - 16),    /*-526 : I/O request was terminated*/
  4171.     gxBadBaudRate                = (gxPrintingResultBase - 17),    /*-527 : Invalid baud rate specified*/
  4172.     gxBadParity                    = (gxPrintingResultBase - 18),    /*-528 : Invalid parity specified*/
  4173.     gxBadStopBits                = (gxPrintingResultBase - 19),    /*-529 : Invalid stop bits specified*/
  4174.     gxBadDataBits                = (gxPrintingResultBase - 20),    /*-530 : Invalid data bits specified*/
  4175.     gxBadPrinterName            = (gxPrintingResultBase - 21),    /*-531 : Bad printer name specified*/
  4176.     gxAioBadMsgType                = (gxPrintingResultBase - 22),    /*-532 : Bad masType field in transfer info structure*/
  4177.     gxAioCantFindDevice            = (gxPrintingResultBase - 23),    /*-533 : Cannot locate target device*/
  4178.     gxAioOutOfSeq                = (gxPrintingResultBase - 24),    /*-534 : Non-atomic SCSI requests submitted out of sequence*/
  4179.     gxPrIOAbortErr                = (gxPrintingResultBase - 25),    /*-535 : I/O operation aborted*/
  4180.     gxPrUserAbortErr            = (gxPrintingResultBase - 26),    /*-536 : User aborted*/
  4181.     gxCantAddPanelsNowErr        = (gxPrintingResultBase - 27),    /*-537 : Can only add panels during driver switch or dialog setup*/
  4182.     gxBadxdtlKeyErr                = (gxPrintingResultBase - 28),    /*-538 : Unknown key for xdtl - must be radiobutton, etc*/
  4183.     gxXdtlItemOutOfRangeErr        = (gxPrintingResultBase - 29),    /*-539 : Referenced item does not belong to panel*/
  4184.     gxNoActionButtonErr            = (gxPrintingResultBase - 30),    /*-540 : Action button is nil*/
  4185.     gxTitlesTooLongErr            = (gxPrintingResultBase - 31),    /*-541 : Length of buttons exceeds alert maximum width*/
  4186.     gxUnknownAlertVersionErr    = (gxPrintingResultBase - 32),    /*-542 : Bad version for printing alerts*/
  4187.     gxGBBufferTooSmallErr        = (gxPrintingResultBase - 33),    /*-543 : Buffer too small.*/
  4188.     gxInvalidPenTable            = (gxPrintingResultBase - 34),    /*-544 : Invalid vector driver pen table.*/
  4189.     gxIncompletePrintFileErr    = (gxPrintingResultBase - 35),    /*-545 : Print file was not completely spooled*/
  4190.     gxCrashedPrintFileErr        = (gxPrintingResultBase - 36),    /*-546 : Print file is corrupted*/
  4191.     gxInvalidPrintFileVersion    = (gxPrintingResultBase - 37),    /*-547 : Print file is incompatible with current QuickDraw GX version*/
  4192.     gxSegmentLoadFailedErr        = (gxPrintingResultBase - 38),    /*-548 : Segment loader error*/
  4193.     gxExtensionNotFoundErr        = (gxPrintingResultBase - 39),    /*-549 : Requested printing extension could not be found*/
  4194.     gxDriverVersionErr            = (gxPrintingResultBase - 40),    /*-550 : Driver too new for current version of QuickDraw GX*/
  4195.     gxImagingSystemVersionErr    = (gxPrintingResultBase - 41),    /*-551 : Imaging system too new for current version of QuickDraw GX*/
  4196.     gxFlattenVersionTooNew        = (gxPrintingResultBase - 42),    /*-552 : Flattened object format too new for current version of QDGX*/
  4197.     gxPaperTypeNotFound            = (gxPrintingResultBase - 43),    /*-553 : Requested papertype could not be found*/
  4198.     gxNoSuchPTGroup                = (gxPrintingResultBase - 44),    /*-554 : Requested papertype group could not be found*/
  4199.     gxNotEnoughPrinterMemory    = (gxPrintingResultBase - 45),    /*-555 : Printer does not have enough memory for fonts in document*/
  4200.     gxDuplicatePanelNameErr        = (gxPrintingResultBase - 46),    /*-556 : Attempt to add more than 10 panels with the same name*/
  4201.     gxExtensionVersionErr        = (gxPrintingResultBase - 47)    /*-557 : Extension too new for current version of QuickDraw GX*/
  4202. };
  4203.  
  4204.  
  4205.  
  4206.  
  4207. #if PRAGMA_STRUCT_ALIGN
  4208.     #pragma options align=reset
  4209. #elif PRAGMA_STRUCT_PACKPUSH
  4210.     #pragma pack(pop)
  4211. #elif PRAGMA_STRUCT_PACK
  4212.     #pragma pack()
  4213. #endif
  4214.  
  4215. #ifdef PRAGMA_IMPORT_OFF
  4216. #pragma import off
  4217. #elif PRAGMA_IMPORT
  4218. #pragma import reset
  4219. #endif
  4220.  
  4221. #ifdef __cplusplus
  4222. }
  4223. #endif
  4224.  
  4225. #endif /* __GXPRINTING__ */
  4226.  
  4227.